working InvertedIndex Comparator