21 using Scorer = Lucene.Net.Search.Scorer;
23 using Weight = Lucene.Net.Search.Weight;
25 namespace Lucene.Net.Search.Spans
30 protected internal Spans spans;
31 protected internal Weight weight;
32 protected internal byte[] norms;
33 protected internal float value_Renamed;
35 protected internal bool more =
true;
37 protected internal int doc;
38 protected internal float freq;
45 this.value_Renamed = weight.
Value;
46 if (this.spans.
Next())
57 public override int NextDoc()
59 if (!SetFreqCurrentDoc())
66 public override int Advance(
int target)
70 return doc = NO_MORE_DOCS;
72 if (spans.
Doc() < target)
75 more = spans.
SkipTo(target);
77 if (!SetFreqCurrentDoc())
84 public virtual bool SetFreqCurrentDoc()
94 int matchLength = spans.
End() - spans.
Start();
98 while (more && (doc == spans.
Doc()));
102 public override int DocID()
107 public override float Score()
117 protected internal virtual Explanation Explain(
int doc)
121 int expDoc = Advance(doc);
123 float phraseFreq = (expDoc == doc)?freq:0.0f;
125 tfExplanation.
Description =
"tf(phraseFreq=" + phraseFreq +
")";
127 return tfExplanation;