-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distance from [lon,lat] to geo_shape #13351
Comments
Hi, We also need |
@nknize any thoughts on this? |
This will likely follow the Lucene 5.5 release which includes the API and performance improvements needed to make this perform at scale. |
+1 for this. I guess es is now on 5.5 any plan to do this. Or suggested architecture/ workaround please? |
Do you have any updates for this by any chance? |
Not yet. A new |
+1 |
3 similar comments
+1 |
+1 |
👍 |
Anything on this? |
+1 |
1 similar comment
+1 |
+1 any update ?? |
I dont want to be troll but even javascript (i work with it) has awesome library https://github.com/Turfjs/turf but high-scalabe technology doesn't. |
+1 |
+1 |
Some thoughts:
Let's maybe split this issue for these different use-cases? |
We could really use this as the new BKD index methodology does not work with intersecting circles in latest ES, and intersecting with circles by converting to polygons is wasteful and inaccurate. |
I am not sure this issue is the right place to have this discussion. but could you explain your use-case a bit more and what type of distance queries you are interested in doing? |
Sure, and my apologies if this is the wrong thread for this. My use case is querying for arbitrary shapes (can be points, multipoints, geometrycollection, polygon, etc...) at a certain distance from a point (actually thousands of points, but we handle this with a bool query). Due to geo_distance only working point-to-point, the workaround way to do this used to be to intersect a circle shape with the relevant index containing the arbitrary shapes. However, due to 6.8’s BKD indexing methodology not working with circles and geoshape intersection, I am left with using the deprecated geohash or prefixtree indexing or turning the circles into polygons and intersecting those. Both these workarounds are not good in my opinion, and are really just backwards ways to do a basic distance filter between a point and a shape, which geo_distance currently doesn’t support. |
Currently, we can do distance math for filter (geo_distance) and sort (_geo_distance) from a given [lon,lat] to a geo_point. We cannot do this currently for a [lon,lat] to the surface of a geo_shape object (distance "N"). There's a bit of a workaround for the geo_distance filter: you can create a circle of a specified radius M and check for an "intersects" relation. However, there are some cases where this does not work (e.g. if M > (N + [span of geo_shape]) it's now "within").
A few examples:
The text was updated successfully, but these errors were encountered: