You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kempelen, Ákos <ak...@wolterskluwer.com> on 2018/10/16 11:36:07 UTC

qf an pf parameters question

Hello,

I use edismax qf and pf parameters, but for some field it would be desired to match ONLY  if terms are in the same phrase.
However, the  qf parameter does not work with phrases, it is just for "filtering", and pf params affects only scoring.

For example:
qf=fulltext subject
pf=fulltext subject^5

subjects in one document1:
- harry potter
- star wars

q=harry star 
will match document1, but it is a wrong result.

Any idea how to solve this?
Akos




Re: qf an pf parameters question

Posted by Andrea Gazzarini <a....@sease.io>.
Hi, you may be interested in the mm [1] parameter, which in this case 
shout be set to 100%. However, if your requirements are more complicated 
than this, an mm=100% could have some unwanted side-effects because it's 
very "rigid".

Best,
Andrea

[1] 
https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Themm_MinimumShouldMatch_Parameter

On 16/10/18 13:36, Kempelen, Ákos wrote:
> Hello,
>
> I use edismax qf and pf parameters, but for some field it would be desired to match ONLY  if terms are in the same phrase.
> However, the  qf parameter does not work with phrases, it is just for "filtering", and pf params affects only scoring.
>
> For example:
> qf=fulltext subject
> pf=fulltext subject^5
>
> subjects in one document1:
> - harry potter
> - star wars
>
> q=harry star
> will match document1, but it is a wrong result.
>
> Any idea how to solve this?
> Akos
>
>
>