How to query or filter by geo distance range in elastic 5.x?

hi guys, help wanted! I just want to know is there anyway to query or filter by geo distance range in elastic 5.x ?

Geo Distance Range Query is Deprecated in 5.0.0, Distance aggregations or sorting can not used to filter document !

Take a look at geo distance range query.

According to the doc, Range searches on indexes created in 5.0.0 and later will no longer be supported. So~

Thanks. I didn't see where that was noted in the doc initially and now I do. So why don't you use distance aggregation or sorting?

Thanks for your reply. I was confused how to impl geo ranges search with distance aggregation or sorting, is there any examples? And when geo distance is not the only one factor which affects the score, what should I do with the distance aggregation or sorting?

1 Like

I too find this abrupt change confusing, and the lack of (and incorrect) documentation of just how one would replace an older geo_distance_range query with aggs/sorting alternatives is frustrating to say the least.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.