Search Order of term in query

Hi All,

if I search for "UK Equity", there is a specific order to the phrase.

Your result will have to return like "XXXXXX UK XXXXX Equity" but not
"XXXXX Equity XXXX UK"

How I can implement this in elastic search?

Please suggest.

Thanks,
Pulkit Agrawal

you can use text query with text phrase type, possibly using a higher than
0 slop value (
Elasticsearch Platform — Find real-time answers at scale | Elastic),
which means how far terms within the phrase can be "apart".

On Sun, Apr 8, 2012 at 2:08 PM, Pulkit Agrawal pulkitdotcom@gmail.comwrote:

Hi All,

if I search for "UK Equity", there is a specific order to the phrase.

Your result will have to return like "XXXXXX UK XXXXX Equity" but not
"XXXXX Equity XXXX UK"

How I can implement this in Elasticsearch?

Please suggest.

Thanks,
Pulkit Agrawal