public AllScorer(Similarity similarity, IndexReader reader, FunctionWeight w) : base(similarity) { this.weight = w; this.qWeight = w.GetValue(); this.reader = reader; this.maxDoc = reader.MaxDoc(); this.hasDeletions = reader.HasDeletions(); vals = ((FunctionQuery)w.GetQuery()).func.GetValues(reader); }
public /*override*/ Explanation Explain(int doc) { float sc = qWeight * vals.FloatVal(doc); Explanation result = new ComplexExplanation (true, sc, "FunctionQuery(" + ((FunctionQuery)weight.GetQuery()).func + "), product of:"); result.AddDetail(vals.Explain(doc)); result.AddDetail(new Explanation(weight.GetQuery().GetBoost(), "boost")); result.AddDetail(new Explanation(weight.GetQueryNorm(), "queryNorm")); return(result); }