LUCENE-4249: fix PayloadTermQuery to defer to the PayloadFunction in explain

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1364812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-07-23 21:48:57 +00:00
parent 29c15ddb20
commit 2ba546ef2e
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@ http://s.apache.org/luceneversions
New features
* LUCENE-4249: Changed the explanation of the PayloadTermWeight to use the
underlying PayloadFunction's explanation as the explanation
for the payload score. (Scott Smerchek via Robert Muir)
* LUCENE-4201: Added JapaneseIterationMarkCharFilter to normalize Japanese
iteration marks. (Robert Muir, Christian Moen)

View File

@ -190,7 +190,7 @@ public class PayloadTermQuery extends SpanTermQuery {
// whether to load the payload or not
// GSI: I suppose we could toString the payload, but I don't think that
// would be a good idea
Explanation payloadExpl = new Explanation(scorer.getPayloadScore(), "scorePayload(...)");
Explanation payloadExpl = function.explain(doc, scorer.payloadsSeen, scorer.payloadScore);
payloadExpl.setValue(scorer.getPayloadScore());
// combined
ComplexExplanation result = new ComplexExplanation();