Hi I am trying to get a query to work and I am not understanding how to make it work
I want to search for all matching words like this
$term = +phrase +phrase +phrase
but if phrase has a space in it, how do i match phrase as a whole entity rather than it separating the words out into separate search items?
"query" : {
"query_string" : {
"query" : "' . $term . '"
}
}
Did you try something like +"this is my phrase" +"Another one" ?
Have a look also at Phrase Query (in Match Query doc) : http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
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