Ejemplo n.º 1
0
 public override void Get(int docID, BytesRef result)
 {
     Debug.Assert(docID >= 0 && docID < maxDoc);
     Debug.Assert(result.IsValid());
     @in.Get(docID, result);
     Debug.Assert(result.IsValid());
 }
Ejemplo n.º 2
0
 public override void LookupOrd(long ord, BytesRef result)
 {
     Debug.Assert(ord >= 0 && ord < valueCount);
     Debug.Assert(result.IsValid());
     @in.LookupOrd(ord, result);
     Debug.Assert(result.IsValid());
 }
Ejemplo n.º 3
0
 public override void LookupOrd(int ord, BytesRef result)
 {
     Debug.Assert(ord >= 0 && ord < ValueCount_Renamed);
     Debug.Assert(result.IsValid());
     @in.LookupOrd(ord, result);
     Debug.Assert(result.IsValid());
 }
Ejemplo n.º 4
0
        public override long LookupTerm(BytesRef key)
        {
            Debug.Assert(key.IsValid());
            long result = @in.LookupTerm(key);

            Debug.Assert(result < valueCount);
            Debug.Assert(key.IsValid());
            return(result);
        }
Ejemplo n.º 5
0
            public override int LookupTerm(BytesRef key)
            {
                Debug.Assert(key.IsValid());
                int result = @in.LookupTerm(key);

                Debug.Assert(result < ValueCount_Renamed);
                Debug.Assert(key.IsValid());
                return(result);
            }
Ejemplo n.º 6
0
 public override void LookupOrd(long ord, BytesRef result)
 {
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(ord >= 0 && ord < valueCount);
     }
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(result.IsValid());
     }
     @in.LookupOrd(ord, result);
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(result.IsValid());
     }
 }
Ejemplo n.º 7
0
 public override void Get(int docID, BytesRef result)
 {
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(docID >= 0 && docID < maxDoc);
     }
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(result.IsValid());
     }
     @in.Get(docID, result);
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(result.IsValid());
     }
 }
Ejemplo n.º 8
0
        public override TermsEnum Intersect(CompiledAutomaton automaton, BytesRef bytes)
        {
            TermsEnum termsEnum = m_input.Intersect(automaton, bytes);

            Debug.Assert(termsEnum != null);
            Debug.Assert(bytes == null || bytes.IsValid());
            return(new AssertingAtomicReader.AssertingTermsEnum(termsEnum));
        }
Ejemplo n.º 9
0
 public override void SeekExact(BytesRef term, TermState state)
 {
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(term.IsValid());
     }
     base.SeekExact(term, state);
     this.state = State.POSITIONED;
 }
Ejemplo n.º 10
0
        public override long LookupTerm(BytesRef key)
        {
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(key.IsValid());
            }
            long result = @in.LookupTerm(key);

            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(result < valueCount);
            }
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(key.IsValid());
            }
            return(result);
        }
Ejemplo n.º 11
0
            public override BytesRef GetPayload()
            {
                Debug.Assert(state != DocsEnumState.START, "GetPayload() called before NextDoc()/Advance()");
                Debug.Assert(state != DocsEnumState.FINISHED, "GetPayload() called after NO_MORE_DOCS");
                Debug.Assert(positionCount > 0, "GetPayload() called before NextPosition()!");
                BytesRef payload = base.GetPayload();

                Debug.Assert(payload == null || payload.IsValid() && payload.Length > 0, "GetPayload() returned payload with invalid length!");
                return(payload);
            }
Ejemplo n.º 12
0
 public override bool SeekExact(BytesRef text)
 {
     Debug.Assert(text.IsValid());
     if (base.SeekExact(text))
     {
         state = State.POSITIONED;
         return(true);
     }
     else
     {
         state = State.UNPOSITIONED;
         return(false);
     }
 }
Ejemplo n.º 13
0
            public override SeekStatus SeekCeil(BytesRef term)
            {
                Debug.Assert(term.IsValid());
                SeekStatus result = base.SeekCeil(term);

                if (result == SeekStatus.END)
                {
                    state = State.UNPOSITIONED;
                }
                else
                {
                    state = State.POSITIONED;
                }
                return(result);
            }
Ejemplo n.º 14
0
            // TODO: we should separately track if we are 'at the end' ?
            // someone should not call next() after it returns null!!!!
            public override BytesRef Next()
            {
                Debug.Assert(state == State.INITIAL || state == State.POSITIONED, "Next() called on unpositioned TermsEnum");
                BytesRef result = base.Next();

                if (result == null)
                {
                    state = State.UNPOSITIONED;
                }
                else
                {
                    Debug.Assert(result.IsValid());
                    state = State.POSITIONED;
                }
                return(result);
            }
Ejemplo n.º 15
0
 public override void SeekExact(BytesRef term, TermState state)
 {
     Debug.Assert(term.IsValid());
     base.SeekExact(term, state);
     this.State = State_e.POSITIONED;
 }