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

Phrase queries are created for each field supplied through edismax's pf, pf2 and pf3 parameters (rather them being combined in a single dismax query)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0
    • 4.10
    • query parsers
    • None

    Description

      SOLR-2058 subtly changed how phrase queries, created through the pf, pf2 and pf3 parameters, are merged into the main user query.

      For the query: 'term1 term2' with pf2:[field1, field2, field3] we now get (omitting the non phrase query section for clarity):

      <main query>
      DisjunctionMaxQuery((field1:"term1 term2"^1.0)~0.1)
      DisjunctionMaxQuery((field2:"term1 term2"^1.0)~0.1)
      DisjunctionMaxQuery((field3:"term1 term2"^1.0)~0.1)
      

      Prior to this change, we had:

      <main query> 
      DisjunctionMaxQuery((field1:"term1 term2"^1.0 | field2:"term1 term2"^1.0 | field3:"term1 term2"^1.0)~0.1)
      

      The upshot being that if the phrase query "term1 term2" appears in multiple fields, it will get a significant boost over the previous implementation.

      Attachments

        1. combined-phrased-dismax.patch
          12 kB
          Michael Dodsworth

        Issue Links

          Activity

            People

              ehatcher Erik Hatcher
              mdodsworth@salesforce.com Michael Dodsworth
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: