text: public override int NextDoc(){if (idx >= size){offset = -1;return doc = DocIdSetIterator.NO_MORE_DOCS;}doc = (int)docs.Get(idx);++idx;while (idx < size && docs.Get(idx) == doc){++idx;}long prevIdx = idx - 1;if (!docsWithField.Get((int)prevIdx)){offset = -1;}else{offset = (int)offsets.Get(prevIdx);length = (int)lengths.Get(prevIdx);}return doc;}