elastic / elasticsearch

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

Enable anchoring at the start and end of fields for positional searching #42794

Open romseygeek opened 5 years ago

romseygeek commented 5 years ago

Finding terms within X positions of the start of a field is currently possible via intervals queries, although it only really works for single-valued fields. It is not at all possible to find a term within X positions of the end of a field.

We should enable this kind of querying, either via access to text.length in interval scripts (not too hard to implement, but tricky to make it work correctly for multi-valued fields) or by indexing boundary markers in text fields.

elasticmachine commented 5 years ago

Pinging @elastic/es-search

elasticsearchmachine commented 1 month ago

Pinging @elastic/es-search-relevance (Team:Search Relevance)