1

All:

[UPDATE]

After reading the debug explain, it seems that the qf will expand only the keywords without specifying field.

===================================================================

When I learn to use edismax query parser, it said the qf paramter is:

Query Fields: specifies the fields in the index on which to perform the query. If absent, defaults to df.

And its purpose is to generate all fields' combination with the query terms.

However, if we already specify the field in query( q prameter), I wonder what happen when I specify another different fields in qf?

For example:

q=title:epic
defType=edismax
qf=content

Could anyone give some explanation how SOLR interpret this query?

Thanks

Kuan
  • 11,149
  • 23
  • 93
  • 201

2 Answers2

1

When you specify qf it means you want solr to search for whatever is in the "q" field in these "qf" fields. So, your first and third line contradict each other:

q=title:epic
defType=edismax
qf=content

If you want to search for any document where the content field contains anything matching your search terms, but these search terms as tokens in "q" separated by +OR+.

like this...

q=I+OR+like+OR+books+ORand+OR+games
defType=edismax
qf=content
Imran Suhail
  • 116
  • 6
0

When q=title:epic. It means you has settled the query field to title, so the qf parameter could not be set as "content", in this case, you have no query result for sure. You leave the qf parameter empty or set it as "title"

printemp
  • 869
  • 1
  • 10
  • 33