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

Edismax missing phrase queries when phrases contain multiterm synonyms

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.1
    • Fix Version/s: 7.6, 8.0
    • Component/s: query parsers
    • Labels:
      None
    • Environment:

      RHEL, MacOS X

      Do not believe this is environment-specific.

      Description

      synonyms.txt:

      allergic, hypersensitive
      aspirin, acetylsalicylic acid
      dog, canine, canis familiris, k 9
      rat, rattus
      

      request handler:

      <requestHandler name="/test_qparse_error" class="solr.SearchHandler">
       <lst name="defaults">
      <!-- Query settings -->
       <str name="defType">edismax</str>
       <str name="tie"> 0.4</str>
       <str name="qf">title^100</str>
       <str name="pf">title~20^5000</str>
       <str name="pf2">title~11</str>
       <str name="pf3">title~22^1000</str>
       <str name="df">text</str>
       <!-- mm If two or fewer clauses exist, they all must match. 
       If three to five clauses exist, one can be missing. If six to eight clauses exist, all but three must match. 
       If more than nine clauses exist, only require 30% to match.-->
       <str name="mm">3&lt;-1 6&lt;-3 9&lt;30%</str>
       <str name="q.alt">*:*</str>
       <str name="rows">25</str>
      </lst>
      </requestHandler>
      

      Phrase queries (pf, pf2, pf3) containing "dog" or "aspirin"  against the above list will not be generated.

      "allergic reaction dog" will generate pf2: "allergic reaction", but not pf:"allergic reaction dog", pf2: "reaction dog", or pf3: "allergic reaction dog"

      "aspirin dose in rats" will generate pf3: "dose ? rats" but not pf2: "aspirin dose" or pf3:"aspirin dose ?"

       

        Attachments

        1. SOLR-12243.patch
          9 kB
          Elizabeth Haubert
        2. SOLR-12243.patch
          11 kB
          Alessandro Benedetti
        3. SOLR-12243.patch
          11 kB
          Alessandro Benedetti
        4. SOLR-12243.patch
          11 kB
          Alessandro Benedetti
        5. SOLR-12243.patch
          12 kB
          Elizabeth Haubert
        6. schema.xml
          2 kB
          Elizabeth Haubert
        7. multiword-synonyms.txt
          0.7 kB
          Elizabeth Haubert
        8. solrconfig.xml
          18 kB
          Elizabeth Haubert
        9. SOLR-12243.patch
          12 kB
          Steve Rowe
        10. SOLR-12243.patch
          16 kB
          Steve Rowe

          Issue Links

            Activity

              People

              • Assignee:
                sarowe Steve Rowe
                Reporter:
                ehaubert Elizabeth Haubert
              • Votes:
                10 Vote for this issue
                Watchers:
                16 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 - 10m
                  10m