Exact phrases in query_string

I am using the query_string method and submitting a user's free-form query syntax, allowing for normal boolean phrasing as people are accustomed to using with Google etc. My understanding is that query_string will parse such queries properly. Among the forms that I want it to parse is an exact phrase, assuming the user will indicate an exact phrase by using quotation marks. So, for example:

writers "Charles Dickens"

I have read the documentation on the query_string method in the DSL, plus this thread. I am submitting the query with the quotation marks escaped:

"query_string": "writers "Charles Dickens""

However, the ES parser seems to be splitting the terms into individual "OR" elements. I get records with "Charles" that are not "Charles Dickens". What am I doing wrong?

Hi,

it works for me. Trying ES 0.18.7 out of the box:

Regards,
Lukas

On Thu, Jan 26, 2012 at 12:06 AM, searchersteve stevesuo@gmail.com wrote:

I want to run a query that return results for Robert E. Anderson and not
for
Robert Johnson.

I have read the documentation on the query_string method in the DSL, plus
this

http://elasticsearch-users.115913.n3.nabble.com/exact-phrase-search-query-failing-tt3258273.html#none
thread . I am submitting the query with the quotation marks escaped:

"query_string": ""Robert E. Anderson""

However, the ES parser seems to be splitting the terms into individual "OR"
elements. I get records with "Robert" that are not "Robert E. Anderson".
What am I doing wrong?

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Exact-phrases-in-query-string-tp3689284p3689284.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.