Payloads are not used much, so it is not surprising there is a hole in a side feature. Please file a bug. Better yet, file a patch!
On Fri, Jul 20, 2012 at 9:13 AM, Scott Smerchek <scott.smerc...@gmail.com> wrote: > I'm using the PayloadTermQuery and scoring documents using a custom > algorithm based on the payloads of the matching terms. The algorithm is > implemented in the custom PayloadFunction and I have added an Override for > the explain. However, the PayloadTermWeight explanation hides the details > of the payload score... > > Explanation payloadExpl = new Explanation(scorer.getPayloadScore(), > "scorePayload(...)"); > > This is different than the way that PayloadNearSpanWeight explains the > payload. It actually asks the payload function for the explanation rather > than hiding it: > > Explanation payloadExpl = function.explain(doc, scorer.payloadsSeen, > scorer.payloadScore); > > This seems like a bug/oversight. Should this be a JIRA issue, or is this > intended? The fix is obviously very simple (just ask the PayloadFunction as > in the PayloadNearSpanWeight). > > - Scott -- Lance Norskog goks...@gmail.com