Exemplo n.º 1
0
 public override int NextDoc()
 {
     if (!didNext && (liveDocs is null || liveDocs.Get(0)))
     {
         didNext = true;
         return(doc = 0);
     }
Exemplo n.º 2
0
 public override int NextDoc()
 {
     if (!didNext && (liveDocs == null || liveDocs.Get(0)))
     {
         didNext = true;
         return(doc = 0);
     }
     else
     {
         return(doc = NO_MORE_DOCS);
     }
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
 public virtual bool Get(int docid)
 {
     return(bits.Get(docid) && outerInstance.Match(docid));
 }