renatoh commented on code in PR #4475:
URL: https://github.com/apache/solr/pull/4475#discussion_r3448998216
##########
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:
The problem with mm for BoolQParserPlugin is that empty clauses are counted
as they were non-empty clauses. e.g. if we have mm=-1 but one should-clause
becomes empty, mm will not be adjusted accordingly. And that is, at least to my
understanding, what mmAutoRelax is for. If set to true, the mm-calculation
will account for empty clauses.
Here the comment describing the parameter:
/** If set to true, will try to reduce MM if tokens are removed from some
clauses but not all */
public static String MM_AUTORELAX = "mm.autoRelax";
--
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]