diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index b3baa80..d4c82b4 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -10,7 +10,10 @@ http://s.apache.org/luceneversions ======================= Lucene 4.0.0-BETA ======================= 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) + * LUCENE-4201: Added JapaneseIterationMarkCharFilter to normalize Japanese iteration marks. (Robert Muir, Christian Moen) diff --git a/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java b/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java index 4d07328..30d5bac 100644 --- a/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java +++ b/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java @@ -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();