You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2010/08/20 22:29:16 UTC

[jira] Commented: (SOLR-2058) Adds optional "phrase slop" to edismax "pf2", "pf3" and "pf" parameters with field~slop^boost syntax

    [ https://issues.apache.org/jira/browse/SOLR-2058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900849#action_12900849 ] 

Yonik Seeley commented on SOLR-2058:
------------------------------------

Map<Integer,Map<String,Float>> is an "interesting" way to encode the slop and the boost :-)
But perhaps we should make a FieldParams class?

We could keep the separate pf,pf2,pf3 maps... or encode the number of terms to make phrases out of in the FieldParams class:
{code}
class FIeldParams {
  int wordGrams;  // make bigrams if 2, trigrams if 3, or all if MAX_INT
  int slop;
  float boost;
}
{code}

> Adds optional "phrase slop" to edismax "pf2", "pf3" and "pf" parameters with field~slop^boost syntax
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2058
>                 URL: https://issues.apache.org/jira/browse/SOLR-2058
>             Project: Solr
>          Issue Type: Improvement
>          Components: SearchComponents - other
>    Affects Versions: 3.1, 4.0
>         Environment: n/a
>            Reporter: Ron Mayer
>            Priority: Minor
>         Attachments: pf2_with_slop.patch
>
>
> 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 <ho...@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}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org