-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
What we'd like to see:
Ability to specify many geo points in geo distance sort, like this:
{
"sort": [
{
"_geo_distance": {
"geo_points.point": [
{
"lat": 59.959946,
"lon": 30.313819
},
{
"lat": 59.979788,
"lon": 30.304513
}
]
}
}
]
}Use-case: each user has several points of interest and wants to find other users who are close to these points. For example, I have work, home, and favourite breakfast cafe. I'd like to find people who hang out near any of those places. Right now I should fire as many queries, as many points of interest I have, and then I need to merge results outside of elasticsearch. Having ability to use single query for this.
Looks like it could be quite trivial change, an extra loop to iterate requested points. I might be wrong about this.
I understand, that it could be very cpu intensive for querying with many points, but the point here is to use small amount of points.