dsmiley commented on code in PR #4475:
URL: https://github.com/apache/solr/pull/4475#discussion_r3452162210


##########
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:
   My reading of mm.autoRelax is that it's pertinent when there are multiple qf 
fields, and, due to varying analysis on different fields, *sometimes* fully 
analyzes away an input token (e.g. due to a stopword) and sometimes not.  The 
code details in SolrPluginUtils in the way it increments/resets certain 
counters here reflects that.  Of course, feel free to prove me wrong; I didn't 
do further research.  Maybe the original JIRA/discussions show more broad usage.
   
   Even if I'm right, there's maybe a case to be made for generalizing the 
concept.



-- 
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]

Reply via email to