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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -