예제 #1
0
            public override int Advance(int target)
            {
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(state != DocsEnumState.FINISHED, "Advance() called after NO_MORE_DOCS");
                }
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(target > doc, "target must be > DocID, got {0} <= {1}", target, doc);
                }
                int advanced = base.Advance(target);

                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(advanced >= target, "backwards advance from: {0} to: {1}", target, advanced);
                }
                positionCount = 0;
                if (advanced == DocIdSetIterator.NO_MORE_DOCS)
                {
                    state       = DocsEnumState.FINISHED;
                    positionMax = 0;
                }
                else
                {
                    state       = DocsEnumState.ITERATING;
                    positionMax = base.Freq;
                }
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(base.DocID == advanced);
                }
                return(doc = advanced);
            }
예제 #2
0
            public override int NextDoc()
            {
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(state != DocsEnumState.FINISHED, "NextDoc() called after NO_MORE_DOCS");
                }
                int nextDoc = base.NextDoc();

                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(nextDoc > doc, "backwards nextDoc from {0} to {1}", doc, nextDoc);
                }
                positionCount = 0;
                if (nextDoc == DocIdSetIterator.NO_MORE_DOCS)
                {
                    state       = DocsEnumState.FINISHED;
                    positionMax = 0;
                }
                else
                {
                    state       = DocsEnumState.ITERATING;
                    positionMax = base.Freq;
                }
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(base.DocID == nextDoc);
                }
                return(doc = nextDoc);
            }
예제 #3
0
        public override int Advance(int target)
        {
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(state != DocsEnumState.FINISHED, "Advance() called after NO_MORE_DOCS");
            }
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(target > doc, () => "target must be > DocID, got " + target + " <= " + doc);
            }
            int advanced = base.Advance(target);

            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(advanced >= target, () => "backwards advance from: " + target + " to: " + advanced);
            }
            if (advanced == DocIdSetIterator.NO_MORE_DOCS)
            {
                state = DocsEnumState.FINISHED;
            }
            else
            {
                state = DocsEnumState.ITERATING;
            }
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(base.DocID == advanced);
            }
            return(doc = advanced);
        }
예제 #4
0
        public override int NextDoc()
        {
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(state != DocsEnumState.FINISHED, "NextDoc() called after NO_MORE_DOCS");
            }
            int nextDoc = base.NextDoc();

            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(nextDoc > doc, () => "backwards NextDoc from " + doc + " to " + nextDoc + " " + m_input);
            }
            if (nextDoc == DocIdSetIterator.NO_MORE_DOCS)
            {
                state = DocsEnumState.FINISHED;
            }
            else
            {
                state = DocsEnumState.ITERATING;
            }
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(base.DocID == nextDoc);
            }
            return(doc = nextDoc);
        }
예제 #5
0
            public override int NextDoc()
            {
                Debug.Assert(State != DocsEnumState.FINISHED, "nextDoc() called after NO_MORE_DOCS");
                int nextDoc = base.NextDoc();

                Debug.Assert(nextDoc > Doc, "backwards nextDoc from " + Doc + " to " + nextDoc + " " + m_input);
                if (nextDoc == DocIdSetIterator.NO_MORE_DOCS)
                {
                    State = DocsEnumState.FINISHED;
                }
                else
                {
                    State = DocsEnumState.ITERATING;
                }
                Debug.Assert(base.DocID == nextDoc);
                return(Doc = nextDoc);
            }
예제 #6
0
            public override int Advance(int target)
            {
                Debug.Assert(State != DocsEnumState.FINISHED, "advance() called after NO_MORE_DOCS");
                Debug.Assert(target > Doc, "target must be > docID(), got " + target + " <= " + Doc);
                int advanced = base.Advance(target);

                Debug.Assert(advanced >= target, "backwards advance from: " + target + " to: " + advanced);
                if (advanced == DocIdSetIterator.NO_MORE_DOCS)
                {
                    State = DocsEnumState.FINISHED;
                }
                else
                {
                    State = DocsEnumState.ITERATING;
                }
                Debug.Assert(base.DocID == advanced);
                return(Doc = advanced);
            }
예제 #7
0
            public override int NextDoc()
            {
                Debug.Assert(state != DocsEnumState.FINISHED, "NextDoc() called after NO_MORE_DOCS");
                int nextDoc = base.NextDoc();

                Debug.Assert(nextDoc > doc, "backwards nextDoc from " + doc + " to " + nextDoc);
                positionCount = 0;
                if (nextDoc == DocIdSetIterator.NO_MORE_DOCS)
                {
                    state       = DocsEnumState.FINISHED;
                    positionMax = 0;
                }
                else
                {
                    state       = DocsEnumState.ITERATING;
                    positionMax = base.Freq;
                }
                Debug.Assert(base.DocID == nextDoc);
                return(doc = nextDoc);
            }
예제 #8
0
            public override int Advance(int target)
            {
                Debug.Assert(state != DocsEnumState.FINISHED, "Advance() called after NO_MORE_DOCS");
                Debug.Assert(target > doc, "target must be > DocID, got " + target + " <= " + doc);
                int advanced = base.Advance(target);

                Debug.Assert(advanced >= target, "backwards advance from: " + target + " to: " + advanced);
                positionCount = 0;
                if (advanced == DocIdSetIterator.NO_MORE_DOCS)
                {
                    state       = DocsEnumState.FINISHED;
                    positionMax = 0;
                }
                else
                {
                    state       = DocsEnumState.ITERATING;
                    positionMax = base.Freq;
                }
                Debug.Assert(base.DocID == advanced);
                return(doc = advanced);
            }
예제 #9
0
 public override int Advance(int target)
 {
     Debug.Assert(State != DocsEnumState.FINISHED, "advance() called after NO_MORE_DOCS");
     Debug.Assert(target > Doc, "target must be > docID(), got " + target + " <= " + Doc);
     int advanced = base.Advance(target);
     Debug.Assert(advanced >= target, "backwards advance from: " + target + " to: " + advanced);
     PositionCount = 0;
     if (advanced == DocIdSetIterator.NO_MORE_DOCS)
     {
         State = DocsEnumState.FINISHED;
         PositionMax = 0;
     }
     else
     {
         State = DocsEnumState.ITERATING;
         PositionMax = base.Freq();
     }
     Debug.Assert(base.DocID() == advanced);
     return Doc = advanced;
 }
예제 #10
0
 public override int NextDoc()
 {
     Debug.Assert(State != DocsEnumState.FINISHED, "nextDoc() called after NO_MORE_DOCS");
     int nextDoc = base.NextDoc();
     Debug.Assert(nextDoc > Doc, "backwards nextDoc from " + Doc + " to " + nextDoc);
     PositionCount = 0;
     if (nextDoc == DocIdSetIterator.NO_MORE_DOCS)
     {
         State = DocsEnumState.FINISHED;
         PositionMax = 0;
     }
     else
     {
         State = DocsEnumState.ITERATING;
         PositionMax = base.Freq();
     }
     Debug.Assert(base.DocID() == nextDoc);
     return Doc = nextDoc;
 }