janhoy commented on code in PR #4475:
URL: https://github.com/apache/solr/pull/4475#discussion_r3455474719
##########
solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java:
##########
@@ -596,7 +596,9 @@ public static void setMinShouldMatch(BooleanQuery.Builder
q, String spec, boolea
optionalDismaxClauses++;
}
} else {
- if (!(c.query() instanceof MatchNoDocsQuery)) optionalClauses++;
+ if (!(mmAutoRelax && (c.query() instanceof MatchNoDocsQuery))) {
Review Comment:
It's right that `autoRelax` was designed for the corner case of dismax,
where you have different analysis for two fields in the field list, so "the
brown fox" would result in "brown fox" by one ananlyzer and "the brown fox" in
another. Then auto relaxing mm will not require all three terms. Not sure if
it makes sense in a pure BooleanQuery against same field?
Can you give an example of a use case you were thinking of?
--
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]