public virtual void TestSpanNearScorerExplain() { SpanNearQuery q = MakeQuery(); Explanation e = q.Weight(searcher).Explain(searcher.IndexReader, 1); Assert.IsTrue(0.0f < e.Value, "Scorer explanation value for doc#1 isn't positive: " + e.ToString()); }
public virtual void TestSpanNearScorerSkipTo1() { SpanNearQuery q = MakeQuery(); Weight w = q.Weight(searcher); Scorer s = w.Scorer(searcher.GetIndexReader(), true, false); Assert.AreEqual(1, s.Advance(1)); }
public virtual void TestSpanNearScorerExplain() { SpanNearQuery q = MakeQuery(); Weight w = q.Weight(searcher); Scorer s = w.Scorer(searcher.GetIndexReader(), true, false); Explanation e = s.Explain(1); Assert.IsTrue(0.0f < e.GetValue(), "Scorer explanation value for doc#1 isn't positive: " + e.ToString()); }