add unit test and change access modifier in indexInvertedDocOnly