Reputation: 301
I am searching for String Kansas City in description field.
"q":"description: *Kansas City*"
, but I am getting the results for both Kansas and City. Also it is getting the results from content field as well. I am not sure why it is fetching results from content field. Please suggest me if I am doing any error in my query.
Upvotes: 0
Views: 234
Reputation: 1953
After tokenizing and parsing query it looks like kansas city
is tokenized into "kansas" and "city" and filters are applied as per fieldtype definition.
then they are searched in fieldname specified.
description:*Kansas
after tokenizing/word splitting, "city" becomes
different word for which you didn't specify fieldname. so by default it is searched in defaultfield(which is may be content
in your case)
defaultsearchfield:city*
in your case after parsing description:kansas
andcontent:city
you can see the same debugQuery=on with URL in your browser.
Upvotes: 0
Reputation: 3752
Your quoting is wrong
description:"kansas city"
for example
What are the stars for?
Upvotes: 1