slow-J commented on code in PR #16229:
URL: https://github.com/apache/lucene/pull/16229#discussion_r3394997782
##########
lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java:
##########
@@ -97,14 +98,19 @@ public Explanation explain(LeafReaderContext context, int
doc) throws IOExceptio
subs.add(
Explanation.noMatch("no match on required clause (" +
c.query().toString() + ")", e));
fail = true;
+ } else if (c.occur() == Occur.SHOULD) {
+ failingOptionals.add(
+ Explanation.noMatch("no match on optional clause (" +
c.query().toString() + ")", e));
}
}
if (fail) {
return Explanation.noMatch(
"Failure to meet condition(s) of required/prohibited clause(s)",
subs);
} else if (matchCount == 0) {
+ subs.addAll(failingOptionals);
return Explanation.noMatch("No matching clauses", subs);
} else if (shouldMatchCount < minShouldMatch) {
+ subs.addAll(failingOptionals);
Review Comment:
Thanks Mike, I'll look into adding a count here.
--
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]