예제 #1
0
 public override int NextDoc()
 {
     if (!didNext && (liveDocs is null || liveDocs.Get(0)))
     {
         didNext = true;
         return(doc = 0);
     }
예제 #2
0
        public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
        {
            FixedBitSet bits = new FixedBitSet(context.Reader.MaxDoc);

            bits.Set(Doc);
            if (acceptDocs != null && !acceptDocs.Get(Doc))
            {
                bits.Clear(Doc);
            }
            return(bits);
        }
예제 #3
0
 public override int NextDoc()
 {
     if (!didNext && (liveDocs == null || liveDocs.Get(0)))
     {
         didNext = true;
         return(doc = 0);
     }
     else
     {
         return(doc = NO_MORE_DOCS);
     }
 }
예제 #4
0
        public virtual bool Next()
        {
            while (true)
            {
                if (m_count == m_df)
                {
                    return(false);
                }
                int docCode = m_freqStream.ReadVInt32();

                if (m_indexOptions == IndexOptions.DOCS_ONLY)
                {
                    doc += docCode;
                }
                else
                {
                    doc += (int)((uint)docCode >> 1); // shift off low bit
                    if ((docCode & 1) != 0)           // if low bit is set
                    {
                        freq = 1;                     // freq is one
                    }
                    else
                    {
                        freq = m_freqStream.ReadVInt32(); // else read freq
                        Debug.Assert(freq != 1);
                    }
                }

                m_count++;

                if (m_liveDocs == null || m_liveDocs.Get(doc))
                {
                    break;
                }
                SkippingDoc();
            }
            return(true);
        }
예제 #5
0
 public virtual bool Get(int docid)
 {
     return(bits.Get(docid) && outerInstance.Match(docid));
 }