// TODO: override bulk read, for better perf
 public override int NextDoc()
 {
     while (true)
     {
         upto++;
         if (upto < ramTerm.docs.Count)
         {
             current = ramTerm.docs[upto];
             if (liveDocs == null || liveDocs.Get(current.docID))
             {
                 posUpto = 0;
                 return(current.docID);
             }
         }
         else
         {
             return(NO_MORE_DOCS);
         }
     }
 }
Esempio n. 2
0
 // TODO: override bulk read, for better perf
 public override int NextDoc()
 {
     while (true)
     {
         Upto++;
         if (Upto < RamTerm.Docs.Count)
         {
             Current = RamTerm.Docs[Upto];
             if (LiveDocs == null || LiveDocs.Get(Current.DocID))
             {
                 PosUpto = 0;
                 return(Current.DocID);
             }
         }
         else
         {
             return(NO_MORE_DOCS);
         }
     }
 }
 public override void StartDoc(int docID, int freq)
 {
     current = new RAMDoc(docID, freq);
     term.docs.Add(current);
     posUpto = 0;
 }
Esempio n. 4
0
 public override void StartDoc(int docID, int freq)
 {
     Current = new RAMDoc(docID, freq);
     Term.Docs.Add(Current);
     PosUpto = 0;
 }