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

MM ignored in edismax queries with operators

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.5, 6.0
    • query parsers
    • 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.diff
          5 kB
          Andrew Buchanan
        2. SOLR-2649.patch
          12 kB
          Erick Erickson
        3. SOLR-2649.patch
          6 kB
          Jan Høydahl
        4. SOLR-2649-with-Qop.patch
          12 kB
          Greg Pendlebury
        5. SOLR-2649-with-Qop.patch
          11 kB
          Greg Pendlebury

        Issue Links

          Activity

            People

              erickerickson Erick Erickson
              mange Magnus Bergmark
              Votes:
              38 Vote for this issue
              Watchers:
              45 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: