public override int NextDoc() { while (true) { if (Current == null) { if (Upto == NumSubs_Renamed - 1) { return(this.Doc = NO_MORE_DOCS); } else { Upto++; int reader = Subs_Renamed[Upto].Slice.ReaderIndex; Current = Subs_Renamed[Upto].DocsAndPositionsEnum; CurrentBase = MergeState_Renamed.DocBase[reader]; CurrentMap = MergeState_Renamed.DocMaps[reader]; } } int doc = Current.NextDoc(); if (doc != NO_MORE_DOCS) { // compact deletions doc = CurrentMap.Get(doc); if (doc == -1) { continue; } return(this.Doc = CurrentBase + doc); } else { Current = null; } } }
public override int NextDoc() { while (true) { if (Current == null) { if (Upto == NumSubs_Renamed - 1) { return this.Doc = NO_MORE_DOCS; } else { Upto++; int reader = Subs_Renamed[Upto].Slice.ReaderIndex; Current = Subs_Renamed[Upto].DocsAndPositionsEnum; CurrentBase = MergeState_Renamed.DocBase[reader]; CurrentMap = MergeState_Renamed.DocMaps[reader]; } } int doc = Current.NextDoc(); if (doc != NO_MORE_DOCS) { // compact deletions doc = CurrentMap.Get(doc); if (doc == -1) { continue; } return this.Doc = CurrentBase + doc; } else { Current = null; } } }