elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.53k stars 24.61k forks source link

Can there be a syntax similar to phrase query for interval query? #112269

Open S-Dragon0302 opened 2 weeks ago

S-Dragon0302 commented 2 weeks ago

Description

intervals query syntax { "intervals": { "FilterKeys": { "all_of": { "ordered": true, "max_gaps": 5, "intervals": [ { "match": { "query": "hello word", "max_gaps": 0, "ordered": true } }, { "match": { "query": "how to", "max_gaps": 0, "ordered": true } } ] }, "boost": 1 } } }

intervals_phrase syntax { "intervals_phrase":{ "query":"((hello word)~0 (how to)~0)~5", "field":"FilterKeys", "ordered":"true" } }

elasticsearchmachine commented 2 weeks ago

Pinging @elastic/es-search-foundations (Team:Search Foundations)