mapreduce inverted index design pattern