mirror of https://github.com/apache/lucene.git
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:
parent
f69188fa4d
commit
2faaa1bbcd
|
@ -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
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue