elasticsearch - Space issue with query_string -
i using query_string standard analyzer
i have data :-
{ "foo":"john smith" } { "foo":"smith john" } { "foo":"john smith hi how u" } { "foo":"beacon" } { "foo":"demo hei device" }
but when using query query_string :-
{ "query": { "query_string": { "query": "foo:john a" } } }
expected result should :-
{ "foo":"john smith" } { "foo":"smith john" } { "foo":"john smith hi how u" }
actual responce :-
{ "foo":"john smith" } { "foo":"smith john" } { "foo":"john smith hi how u" } { "foo":"beacon" } { "foo":"demo hei device" }
could tell , result data ("foo":"beacon") , { "foo":"demo hei device" } coming ?
i think , query_string considering 3 token :- 1)john
2)a
3) (space)
please how make query_string consider 2 token 1)john 2)a
actually time doest not consider space third token !
right query expected data :-
{ "query": { "query_string": { "query": "foo:(john a)" } } }
Comments
Post a Comment