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
Geo: better handling of malformed geo_points #35554
Geo: better handling of malformed geo_points #35554
Conversation
Improves handling of malformed geo_points when `ignore_malformed` is set to true Closes elastic#35419
Pinging @elastic/es-search-aggs |
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.
@imotov looks good to me except for a small issue I left a comment on.
@@ -260,7 +260,11 @@ protected void parse(ParseContext context, GeoPoint point) throws IOException { | |||
throw new IllegalArgumentException("illegal longitude value [" + point.lon() + "] for " + name()); | |||
} | |||
} else { | |||
GeoUtils.normalizePoint(point); | |||
if (isNormalizable(point.lat()) && isNormalizable(point.lat())) { |
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.
should one of these be point.lon()?
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.
If so, there should probably also be a test added that would have caught this.
@cbuescher I pushed the changes that you have requested. Could you take another look? |
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.
Thanks for the change @imotov, LGTM
Improves handling of malformed geo_points when `ignore_malformed` is set to true Closes #35419
Improves handling of malformed geo_points when
ignore_malformed
isset to true
Closes #35419