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

edismax pf clause makes no sense when query already has quoted subphrase

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • query parsers
    • None

    Description

      As noted by ldavid2020 on the solr-user mailing list (Tue, 20 Dec 2011) the behavior of edismax when the pf param is used and the query string contains quotes arround part of the query makes no sense at all...

      For the same query: 2012 "japan airlines" flight status

      dismax...

      http://localhost:8983/solr/select?q=2012+"japan+airlines"+flight+status&qf=TTL&pf=TTL&debugQuery=true&defType=dismax

      outputs:

      +((DisjunctionMaxQuery((TTL:2012)~0.1)
         DisjunctionMaxQuery((TTL:"japan airlin"~3)~0.1)
         DisjunctionMaxQuery((TTL:flight)~0.1)
         DisjunctionMaxQuery((TTL:status)~0.1)
        )~3) 
      DisjunctionMaxQuery((TTL:"2012 japan airlin flight status"~3)~0.1)
      

      The parsedquery has DisjunctionMaxQuery((TTL:"2012 japan airlin flight status"~3)~0.1).

      While edismax...

      http://localhost:8983/solr/select?q=2012+"japan+airlines"+flight+status&qf=TTL&pf=TTL&debugQuery=true&defType=edismax

      outputs:

      +((DisjunctionMaxQuery((TTL:2012)~0.1)
         DisjunctionMaxQuery((TTL:"japan airlin"~3)~0.1)
         DisjunctionMaxQuery((TTL:flight)~0.1)
         DisjunctionMaxQuery((TTL:status)~0.1)
        )~3) 
      DisjunctionMaxQuery((TTL:"2012 flight status"~3)~0.1)
      

      The parsedquery has DisjunctionMaxQuery((TTL:"2012 flight status"~3)~0.1).

      ...

      So it seems edismax ignores "japan airlines" for the pf matching. This could cause some issues, in that a document with exactly phrase "2012 japan airlines flight status" will have the same relevancy score with another one with two phrases "japan airlines", "2012 flight status" far away.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hossman Chris M. Hostetter
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: