Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
8.4.1
-
None
Description
When specifying "mm" as a local parameter:
q={!edismax mm="100%25" v=$qq}&qq=foo %2Bbar&rows=0&uf=* query
is not functionally equivalent to
q={!edismax v=$qq}&qq=foo %2Bbar&rows=0&uf=* query&mm=100%25
It seems to be caused by the following code in ExtendedDismaxQParser
// 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 }
We need to check if user specified "mm" explicitly. We could change
mmSpec = params.get(DisMaxParams.MM, "0%");
to
mmSpec = config.solrParams.get(DisMaxParams.MM, "0%");
so we check local params too.
Attachments
Issue Links
- links to