Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14517

MM local params value is ignored in edismax queries with operators

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.4.1
    • Fix Version/s: master (9.0), 8.6
    • Component/s: query parsers
    • Labels:
      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

            Activity

              People

              • Assignee:
                gerlowskija Jason Gerlowski
                Reporter:
                yuriykoval Yuriy Koval
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m