Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOLR df and qf explanation

Tags:

search

solr

I cannot find an adequeate explanation of how these query params interact

I am getting suprising (to me) results that if I specify

qf=title^20 description^10

then I get no results however if I then add

df=description

I do get results

df is set to text in solrconfig.xml - which will change - but my question is this - does the df setting somehow override the qf setting? this seems odd

like image 968
dice Avatar asked Jun 28 '13 11:06

dice


People also ask

What is the difference between Q and FQ in Solr?

Standard solr queries use the "q" parameter in a request. Filter queries use the "fq" parameter. The primary difference is that filtered queries do not affect relevance scores; the query functions purely as a filter (docset intersection, essentially).

How query all fields in Solr?

The correct way is the copyField you have and declaring the field all as the default search field. That's how the examples that ship with Solr out of the box do it. Excellent, adding <str name="df">all</str> to defaults in solrconfig. xml indeed solved this.

What is defType in Solr?

The defType parameter selects the query parser that Solr should use to process the main query parameter ( q ) in the request. For example: defType=dismax. If no defType param is specified, then by default, the The Standard Query Parser is used. ( eg: defType=lucene )

What is DisMax eDisMax?

The Extended DisMax (eDisMax) query parser is an improved version of the DisMax query parser. In addition to supporting all the DisMax query parser parameters, Extended Dismax: supports the full Lucene query parser syntax. supports queries such as AND, OR, NOT, -, and +.


Video Answer


1 Answers

df is the default field and will only take effect if the qf is not defined.

I guess you are not using dismax parser and using the default settings in solrconfig.xml

qf then won't take effect anyways and the df field which is text would not return values.

df=description searches on the field and hence returns values. Try passing defType=edismax as parameter.

like image 65
Jayendra Avatar answered Sep 21 '22 13:09

Jayendra