Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

solr extendeDisMax parser pf and qf parameter difference

Tags:

solr

I do not understand the difference for pf and qf.

Like qf is the boosted query field, for example: id^2 date title. So the search result is based on this(I did not set the mm parameter). It seems here I already get all the search results, right?

And then if the pf field: id date title^2 has a influence on score, which means title match is more significant right?

If so is that means the pf settings erase the qf setting, why not make the qf same as pf in this situation? There is sth. misunderstood, but I could not find that out. Hope someone could help.thx

like image 791
printemp Avatar asked Aug 10 '15 14:08

printemp


1 Answers

There is a little correction to your understanding and is as below.

qf Query Fields: specifies the fields in the index on which to perform the query. If absent, defaults to df. pf Phrase Fields: boosts the score of documents in cases where all of the terms in the q parameter appear in close proximity.

This means, fields mentioned in the qf will be used for searching, but fields mentioned in the pf will not be used for searching but will just be used for boosting.

So it makes sense when pf overrides the boosting's defined on fields mentioned in qf.

Ref: https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser

like image 200
Aneesh Mon N Avatar answered Oct 12 '22 20:10

Aneesh Mon N