1. Solr
  2. SOLR-2058

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


    • 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:
    • Environment:



      From Ron Mayer <>
      ... 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".

      From Yonik Seeley <>
      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


      From Chris Hostetter <>

      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.


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

        Issue Links



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


              • Created: