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 legacy GeoPointField decoding in FieldStats #24534

Merged
merged 1 commit into from
May 15, 2017
Merged

Conversation

nknize
Copy link
Contributor

@nknize nknize commented May 6, 2017

LegacyGeoPointField was using the wrong decoding for min/max prefix coded GeoPoint Terms. This PR applies the correct decoding. Note that the min/max values, though, are likely useless anyway since they map to a low resolution morton encoded version of the point; not something that is really of value for field stats.

closes #24275

@jpountz
Copy link
Contributor

jpountz commented May 10, 2017

Can you add a test?

@jimczi
Copy link
Contributor

jimczi commented May 11, 2017

@nknize if adding a test is not possible you can also remove the field stats impl for legacy point ? This is not needed and we don't want to fail a request for an encoding problem.

@nknize
Copy link
Contributor Author

nknize commented May 11, 2017

Thx @jpountz and @jimczi I added a simple test that simply ensures the request doesn't fail.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -676,6 +687,27 @@ public static FieldStats randomFieldStats(boolean withNullMinMax) throws Unknown
}
}

public void testGeo() {
Version version = VersionUtils.randomVersionBetween(random(), Version.V_2_0_0, Version.CURRENT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we test more than one version at a time ? At least one of v2 and one of v5.

@nknize nknize force-pushed the fix/24275 branch 4 times, most recently from 72a8768 to 28ee645 Compare May 12, 2017 17:12
LegacyGeoPointField was using the wrong decoding for min/max prefix coded GeoPoint Terms. This commit applies the correcct decoding. Note that the min/max values, though, are likely useless anyway since they map to a low resolution morton encoded version of the point; not something that is really of value for field stats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates v5.3.3 v5.4.1 v5.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants