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

MM ignored in edismax queries with operators

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: query parsers
    • Labels:
      None

      Description

      Hypothetical scenario:
      1. User searches for "stocks oil gold" with MM set to "50%"
      2. User adds "-stockings" to the query: "stocks oil gold -stockings"
      3. User gets no hits since MM was ignored and all terms where AND-ed together

      The behavior seems to be intentional, although the reason why is never explained:
      // For correct lucene queries, turn off mm processing if there
      // were explicit operators (except for AND).
      boolean doMinMatched = (numOR + numNOT + numPluses + numMinuses) == 0;
      (lines 232-234 taken from tags/lucene_solr_3_3/solr/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java)

      This makes edismax unsuitable as an replacement to dismax; mm is one of the primary features of dismax.

        Attachments

        1. SOLR-2649.patch
          12 kB
          Erick Erickson
        2. SOLR-2649-with-Qop.patch
          12 kB
          Greg Pendlebury
        3. SOLR-2649-with-Qop.patch
          11 kB
          Greg Pendlebury
        4. SOLR-2649.patch
          6 kB
          Jan Høydahl
        5. SOLR-2649.diff
          5 kB
          Andrew Buchanan

          Issue Links

            Activity

              People

              • Assignee:
                erickerickson Erick Erickson
                Reporter:
                mange Magnus Bergmark
              • Votes:
                38 Vote for this issue
                Watchers:
                50 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: