added specs for invertedIndex