20 namespace Lucene.Net.Search
34 private int doc = - 1;
43 this.reqScorer = reqScorer;
44 this.exclDisi = exclDisi;
47 public override int NextDoc()
49 if (reqScorer == null)
54 if (doc == NO_MORE_DOCS)
63 return doc = ToNonExcluded();
78 private int ToNonExcluded()
80 int exclDoc = exclDisi.DocID();
81 int reqDoc = reqScorer.DocID();
88 else if (reqDoc > exclDoc)
90 exclDoc = exclDisi.Advance(reqDoc);
91 if (exclDoc == NO_MORE_DOCS)
102 while ((reqDoc = reqScorer.NextDoc()) != NO_MORE_DOCS);
107 public override int DocID()
117 public override float Score()
119 return reqScorer.Score();
122 public override int Advance(
int target)
124 if (reqScorer == null)
126 return doc = NO_MORE_DOCS;
128 if (exclDisi == null)
130 return doc = reqScorer.Advance(target);
132 if (reqScorer.Advance(target) == NO_MORE_DOCS)
135 return doc = NO_MORE_DOCS;
137 return doc = ToNonExcluded();