You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/06/01 12:14:00 UTC
[jira] [Commented] (SOLR-14517) MM local params value is ignored in
edismax queries with operators
[ https://issues.apache.org/jira/browse/SOLR-14517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120971#comment-17120971 ]
ASF subversion and git services commented on SOLR-14517:
--------------------------------------------------------
Commit cb7e948d2ed061cb1e3ec37d3ffae85b7dc15eda in lucene-solr's branch refs/heads/master from Yuriy Koval
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=cb7e948 ]
SOLR-14517 Obey "mm" local param on edismax queries with operators (#1540)
Prior to this commit query parsing looked for mm in query-params, but neglected to check local params for a subset of queries.
> 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
> Components: query parsers
> Affects Versions: 8.4.1
> Reporter: Yuriy Koval
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org