Implementing inverted index in MapReduce