Creating inverted index