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
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).
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.
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 )
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 +.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With