// constructor internal ValueSourceScorer(ValueSourceQuery enclosingInstance, Similarity similarity, IndexReader reader, ValueSourceWeight w) : base(similarity) { InitBlock(enclosingInstance); this.weight = w; this.qWeight = w.Value; // this is when/where the values are first created. vals = Enclosing_Instance.valSrc.GetValues(reader); termDocs = reader.TermDocs(null); }
/*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.explain(Lucene.Net.Index.IndexReader, int) */ public override Explanation Explain(IndexReader reader, int doc) { DocValues vals = enclosingInstance.valSrc.GetValues(reader); float sc = queryWeight * vals.FloatVal(doc); Explanation result = new ComplexExplanation(true, sc, enclosingInstance.ToString() + ", product of:") ; result.AddDetail(vals.Explain(doc)); result.AddDetail(new Explanation(enclosingInstance.Boost, "boost")); result.AddDetail(new Explanation(queryNorm, "queryNorm")); return(result); }
// constructor internal ValueSourceScorer(ValueSourceQuery enclosingInstance, Similarity similarity, IndexReader reader, ValueSourceWeight w) : base(similarity) { InitBlock(enclosingInstance); this.weight = w; this.qWeight = w.Value; // this is when/where the values are first created. vals = Enclosing_Instance.valSrc.GetValues(reader); termDocs = reader.TermDocs(null); }