elastic / elasticsearch

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

Distance feature query: add support for numeric fields #51804

Open fbaligand opened 4 years ago

fbaligand commented 4 years ago

Currently, Distance feature query deals only date and geo types. This would be great to also support numeric types (long, integer, ...).

For example, I currently use Elasticsearch to do geocoding. For this use case, ability to find the closest street number, compared to searched street number would be very interesting!

elasticmachine commented 4 years ago

Pinging @elastic/es-analytics-geo (:Analytics/Geo)

elasticmachine commented 2 years ago

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

wchaparro commented 2 years ago

This is a search issue, reassigning. Could this be done using runtime fields?

fbaligand commented 2 years ago

This is a search issue. But the aim of this issue is to enhanced « distance feature query », to support numeric fields, in plus of date and geopoint fields: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-distance-feature-query.html

No relation with runtime fields.

mayya-sharipova commented 2 years ago

@fbaligand Thank you for submitting your request. We've discussed it within the team, and we found the provided use case to be quite unique, we haven't heard from other users asking for this. Also there is a way to implement this through script_score query, where you can design you own scoring formula based on field's numeric values.

We will still keep the issue open in case we hear more use cases, but currently we don't plan to implement it.

fbaligand commented 2 years ago

Sad to hear this, but thanks for the information.

ulpcan commented 9 months ago

While my date field can be consist of epoch seconds, type of long should be work too

It could be nice

elasticsearchmachine commented 2 months ago

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