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

Geo: better handling of malformed geo_points #35554

Merged
merged 3 commits into from Nov 26, 2018

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Nov 14, 2018

Improves handling of malformed geo_points when ignore_malformed is
set to true

Closes #35419

Improves handling of malformed geo_points when `ignore_malformed` is
set to true

Closes elastic#35419
@imotov imotov added >bug :Analytics/Geo Indexing, search aggregations of geo points and shapes v7.0.0 v6.6.0 labels Nov 14, 2018
@imotov imotov requested a review from nknize November 14, 2018 17:06
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Member

@cbuescher cbuescher left a 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())) {
Copy link
Member

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()?

Copy link
Member

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.

@imotov
Copy link
Contributor Author

imotov commented Nov 26, 2018

@cbuescher I pushed the changes that you have requested. Could you take another look?

Copy link
Member

@cbuescher cbuescher left a 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

@imotov imotov removed the request for review from nknize November 26, 2018 17:37
@imotov imotov merged commit 663563f into elastic:master Nov 26, 2018
imotov added a commit that referenced this pull request Nov 27, 2018
Improves handling of malformed geo_points when `ignore_malformed` is
set to true

Closes #35419
@imotov imotov deleted the issue-35419-better-geopoint-parsing branch May 1, 2020 22:18
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 v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants