Solr
  1. Solr
  2. SOLR-2058

Adds optional "phrase slop" to edismax "pf2", "pf3" and "pf" parameters with field~slop^boost syntax

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: query parsers
    • Labels:
      None
    • Environment:

      n/a

      Description

      http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3C4C659119.2010007@0ape.com%3E

      From Ron Mayer <r...@0ape.com>
      ... my results might be even better if I had a couple different "pf2"s with different "ps"'s at the same time. In particular. One with ps=0 to put a high boost on ones the have the right ordering of words. For example insuring that [the query]:
      "red hat black jacket"
      boosts only documents with "red hats" and not "black hats". And another pf2 with a more modest boost with ps=5 or so to handle the query above also boosting docs with
      "red baseball hat".

      http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3CAANLkTimd+V3g6d_MnHP+JYkKd+dej8FVMvF_1LQoiLBU@mail.gmail.com%3E

      From Yonik Seeley <yo...@lucidimagination.com>
      Perhaps fold it into the pf/pf2 syntax?

      pf=text^2 // current syntax... makes phrases with a boost of 2
      pf=text~1^2 // proposed syntax... makes phrases with a slop of 1 and
      a boost of 2

      That actually seems pretty natural given the lucene query syntax - an
      actual boosted sloppy phrase query already looks like
      text:"foo bar"~1^2

      -Yonik

      http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3Calpine.DEB.1.10.1008161300510.6335@radix.cryptio.net%3E

      From Chris Hostetter <hossman_luc...@fucit.org>

      Big +1 to this idea ... the existing "ps" param can stick arround as the
      default for any field that doesn't specify it's own slop in the pf/pf2/pf3
      fields using the "~" syntax.

      -Hoss

      1. SOLR-2058-and-3351-not-finished.patch
        82 kB
        Jan Høydahl
      2. SOLR-2058.patch
        10 kB
        James Dyer
      3. edismax_pf_with_slop_v2.1.patch
        7 kB
        Ron Mayer
      4. edismax_pf_with_slop_v2.patch
        8 kB
        Ron Mayer
      5. pf2_with_slop.patch
        6 kB
        Ron Mayer

        Issue Links

          Activity

          Ron Mayer created issue -
          Ron Mayer made changes -
          Field Original Value New Value
          Attachment pf2_with_slop.patch [ 12452509 ]
          Ron Mayer made changes -
          Summary Adds optional "slop" to "pf2", "pf3" and "pf" parameters Adds optional "phrase slop" to "pf2", "pf3" and "pf" parameters with field~slop^boost syntax
          Ron Mayer made changes -
          Original Estimate 168h [ 604800 ]
          Remaining Estimate 168h [ 604800 ]
          Ron Mayer made changes -
          Summary Adds optional "phrase slop" to "pf2", "pf3" and "pf" parameters with field~slop^boost syntax Adds optional "phrase slop" to edismax "pf2", "pf3" and "pf" parameters with field~slop^boost syntax
          Ron Mayer made changes -
          Description http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3C4C659119.2010007@0ape.com%3E
          {quote}
          From Ron Mayer <r...@0ape.com>
           my results might
           be even better if I had a couple different "pf2"s with different "ps"'s
           at the same time.

           In particular. One with ps=0 to put a high boost on ones the have
           the right ordering of words. For example insuring that:
            "red hat black jacket"
           boosts only red hats and not black hats.

           And another pf2 with a more modest boost with ps=5 or so to handle
           the query above also boosting docs with "red baseball hat".
          {quote}

          [http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3CAANLkTimd+V3g6d_MnHP+JYkKd+dej8FVMvF_1LQoiLBU@mail.gmail.com%3E]
          {quote}
          From Yonik Seeley <yo...@lucidimagination.com>

          Perhaps fold it into the pf/pf2 syntax?

          pf=text^2 // current syntax... makes phrases with a boost of 2
          pf=text~1^2 // proposed syntax... makes phrases with a slop of 1 and
          a boost of 2

          That actually seems pretty natural given the lucene query syntax - an
          actual boosted sloppy phrase query already looks like
          text:"foo bar"~1^2

          -Yonik
          http
          {quote}

          [http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3Calpine.DEB.1.10.1008161300510.6335@radix.cryptio.net%3E]
          {quote}
          From Chris Hostetter <hossman_luc...@fucit.org>

          Big +1 to this idea ... the existing "ps" param can stick arround as the
          default for any field that doesn't specify it's own slop in the pf/pf2/pf3
          fields using the "~" syntax.

          -Hoss
          {quote}
          http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3C4C659119.2010007@0ape.com%3E
          {quote}
          From Ron Mayer <r...@0ape.com>
          ... my results might be even better if I had a couple different "pf2"s with different "ps"'s at the same time. In particular. One with ps=0 to put a high boost on ones the have the right ordering of words. For example insuring that [the query]:
            "red hat black jacket"
           boosts only documents with "red hats" and not "black hats". And another pf2 with a more modest boost with ps=5 or so to handle the query above also boosting docs with
            "red baseball hat".
          {quote}

          [http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3CAANLkTimd+V3g6d_MnHP+JYkKd+dej8FVMvF_1LQoiLBU@mail.gmail.com%3E]
          {quote}
          From Yonik Seeley <yo...@lucidimagination.com>
          Perhaps fold it into the pf/pf2 syntax?

          pf=text^2 // current syntax... makes phrases with a boost of 2
          pf=text~1^2 // proposed syntax... makes phrases with a slop of 1 and
          a boost of 2

          That actually seems pretty natural given the lucene query syntax - an
          actual boosted sloppy phrase query already looks like
          {{text:"foo bar"~1^2}}

          -Yonik
          {quote}

          [http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3Calpine.DEB.1.10.1008161300510.6335@radix.cryptio.net%3E]
          {quote}
          From Chris Hostetter <hossman_luc...@fucit.org>

          Big +1 to this idea ... the existing "ps" param can stick arround as the
          default for any field that doesn't specify it's own slop in the pf/pf2/pf3
          fields using the "~" syntax.

          -Hoss
          {quote}
          Ron Mayer made changes -
          Attachment edismax_pf_with_slop_v2.patch [ 12453473 ]
          Ron Mayer made changes -
          Attachment edismax_pf_with_slop_v2.1.patch [ 12453479 ]
          Ron Mayer made changes -
          Link This issue depends on SOLR-1553 [ SOLR-1553 ]
          Jan Høydahl made changes -
          Component/s query parsers [ 12317802 ]
          Component/s SearchComponents - other [ 12313214 ]
          Jan Høydahl made changes -
          Link This issue relates to SOLR-3351 [ SOLR-3351 ]
          Jan Høydahl made changes -
          Assignee Jan Høydahl [ janhoy ]
          Fix Version/s 4.0 [ 12314992 ]
          Affects Version/s 3.1 [ 12314371 ]
          Affects Version/s 4.0 [ 12314992 ]
          Jan Høydahl made changes -
          Link This issue is part of SOLR-2368 [ SOLR-2368 ]
          James Dyer made changes -
          Attachment SOLR-2058.patch [ 12527901 ]
          Jan Høydahl made changes -
          Assignee Jan Høydahl [ janhoy ]
          Jan Høydahl made changes -
          Attachment SOLR-2058-and-3351-not-finished.patch [ 12528598 ]
          James Dyer made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee James Dyer [ jdyer ]
          Resolution Fixed [ 1 ]
          Gavin made changes -
          Link This issue depends on SOLR-1553 [ SOLR-1553 ]
          Gavin made changes -
          Link This issue depends upon SOLR-1553 [ SOLR-1553 ]
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Michael Dodsworth made changes -
          Link This issue relates to SOLR-6062 [ SOLR-6062 ]

            People

            • Assignee:
              James Dyer
              Reporter:
              Ron Mayer
            • Votes:
              4 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development