Yuriy Koval created SOLR-14517:
----------------------------------

             Summary: MM local params value is ignored in edismax queries with 
operators
                 Key: SOLR-14517
                 URL: https://issues.apache.org/jira/browse/SOLR-14517
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: query parsers
    Affects Versions: 8.4.1
            Reporter: Yuriy Koval


When specifying "mm" as a local parameter:

{color:#e01e5a}q=\{!edismax mm="100%25" v=$qq}&qq=foo %2Bbar&rows=0&uf=* 
_query_{color}
 {color:#1d1c1d}is not functionally equivalent to{color}
 {{{color:#e01e5a}q=\{!edismax v=$qq}&qq=foo %2Bbar&rows=0&uf=* 
_query_&mm=100%25{color}}}

 It seems to be caused by the following code in 
{color:#e01e5a}ExtendedDismaxQParser{color}

 
{code:java}
// For correct lucene queries, turn off mm processing if no explicit mm spec 
was provided
// and there were explicit operators (except for AND).
if (query instanceof BooleanQuery) {
 // config.minShouldMatch holds the value of mm which MIGHT have come from the 
user,
 // but could also have been derived from q.op.
 String mmSpec = config.minShouldMatch;

 if (foundOperators(clauses, config.lowercaseOperators)) {
 mmSpec = params.get(DisMaxParams.MM, "0%"); // Use provided mm spec if 
present, otherwise turn off mm processing
 }{code}
 

We need to check if user specified "mm" explicitly. We could change
{code:java}
mmSpec = params.get(DisMaxParams.MM, "0%");
{code}
to
{code:java}
mmSpec = config.solrParams.get(DisMaxParams.MM, "0%");
{code}
so we check local params too.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to