Added nextDoc for InvertedOccurence