Skip to content
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

Fix for geohash neighbors when geohash length is even. #8529

Closed
wants to merge 1 commit into from

Conversation

clement-tourriere
Copy link

We don't have to set XLimit and YLimit depending on the level (even or odd), since semantics of x and y are already swapped on each level.
XLimit is always 7 and YLimit is always 3.

Close #8526

We don't have to set XLimit and YLimit depending on the level (even or odd), since semantics of x and y are already swapped on each level.
XLimit is always 7 and YLimit is always 3.

Close elastic#8526
@s1monw
Copy link
Contributor

s1monw commented Nov 23, 2014

@nknize can you take a look at this?

@s1monw s1monw added the discuss label Nov 23, 2014
@nknize
Copy link
Contributor

nknize commented Nov 24, 2014

This is a correct and simple fix to a legit bug. As the comment mentions, x/y semantics were already swapped on each geohash level. xLimit and yLimit were reversing the semantics and the unit tests did not catch this boundary condition. I wrote an additional test case to cover the odd and even boundary condition.

@nknize nknize added v1.4.0 >bug :Analytics/Geo Indexing, search aggregations of geo points and shapes and removed >bug labels Nov 24, 2014
@clintongormley
Copy link

@nknize in that case you want to rebase and merge it in to 1.3, 1.4, 1.x and master please?

@nknize nknize added v1.3.0 and removed discuss labels Nov 25, 2014
@nknize
Copy link
Contributor

nknize commented Nov 25, 2014

@clement-tourriere proposed pr merged at request of @clintongormley

@nknize nknize closed this Nov 25, 2014
@clintongormley clintongormley changed the title Fix for geohash neighbors when geohash length is even. Geo: Fix for geohash neighbors when geohash length is even. Nov 25, 2014
clement-tourriere pushed a commit to opendatasoft/elasticsearch-aggregation-geoclustering that referenced this pull request Nov 28, 2014
Use internal GeoHash neighbours computation, fixed by elastic/elasticsearch#8529
clement-tourriere pushed a commit to opendatasoft/elasticsearch-aggregation-geoclustering that referenced this pull request Nov 28, 2014
Use internal GeoHash neighbours computation, fixed by elastic/elasticsearch#8529
@clintongormley clintongormley changed the title Geo: Fix for geohash neighbors when geohash length is even. Fix for geohash neighbors when geohash length is even. Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug v1.3.6 v1.4.1 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geo: incorrect neighbours computation in GeoHashUtils
4 participants