SOLR-25 - change FunctionQuery to use ComplexExplanation

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@452973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2006-10-04 18:53:06 +00:00
parent f69188fa4d
commit 2faaa1bbcd
2 changed files with 6 additions and 4 deletions

View File

@ -70,6 +70,9 @@ Changes in runtime behavior
with that name does not exist. (hossman, SOLR-43)
6. The DisMaxRequestHandler now supports multiple occurances of the "fq"
param. (hossman, SOLR-44)
7. FunctionQuery.explain now uses ComplexExplanation to provide more
accurate score explanations when composed in a BooleanQuery.
(hossman, SOLR-25)
Optimizations
1. getDocListAndSet can now generate both a DocList and a DocSet from a

View File

@ -134,10 +134,9 @@ public class FunctionQuery extends Query {
public Explanation explain(int doc) throws IOException {
float sc = qWeight * vals.floatVal(doc);
Explanation result = new Explanation();
result.setDescription("FunctionQuery(" + func
+ "), product of:");
result.setValue(sc);
Explanation result = new ComplexExplanation
(true, sc, "FunctionQuery(" + func + "), product of:");
result.addDetail(vals.explain(doc));
result.addDetail(new Explanation(getBoost(), "boost"));
result.addDetail(new Explanation(weight.queryNorm,"queryNorm"));