-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Conversation
Can you add a test? |
@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. |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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.
72a8768
to
28ee645
Compare
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.
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