Lucene.Net.Search.DocIdSetIterator.SlowAdvance C# (CSharp) Method

SlowAdvance() protected method

Slow (linear) implementation of #advance relying on #nextDoc() to advance beyond the target position.
protected SlowAdvance ( int target ) : int
target int
return int
        protected internal int SlowAdvance(int target)
        {
            Debug.Assert(DocID() == NO_MORE_DOCS || DocID() < target); // can happen when the enum is not positioned yet
            int doc;
            do
            {
                doc = NextDoc();
            } while (doc < target);
            return doc;
        }