I am using Elastic search 6.2.3
. We are using the query_string
full-text-query
for the full-text
search. At present, if we search lazy brown fox
it searches any file that has all these words lazy
, brown
and fox
but it does not look for exact-phrase
'lazy brown fox', even default slop
is zero
.
Here is an example:
{
"query": {
"query_string": {
"fields": [],
"query": "lazy AND brown AND fox"
}
}
}
I have looked at the match-phrase-query
but the issue is that we have to specify the field name(s)
in match-phrase-query
whereas, in string-query
, it's working with a blank array at fields option.
Please suggest, how to get the exact phrase match results using query_string
full text-query
?