gaobinlong commented on code in PR #15819:
URL: https://github.com/apache/lucene/pull/15819#discussion_r3419893044
##########
lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java:
##########
@@ -193,6 +195,33 @@ public ScorerSupplier scorerSupplier(LeafReaderContext
context) throws IOExcepti
}
NumericDocValues norms = context.reader().getNormValues(field);
PayloadSpans payloadSpans = new PayloadSpans(spans, decoder);
+ // When the inner weight is SpanOrWeight, use per-clause scorers so that
+ // getSpanScore() is consistent with innerWeight.explain()
+ if (innerWeight instanceof SpanOrQuery.SpanOrWeight spanOrWeight) {
Review Comment:
Thanks! Changed that following your comments, please help to review again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]