-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Support WKT point conversion to geo_point type #44107
Conversation
Pinging @elastic/es-analytics-geo |
@elasticmachine test this please |
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.
Looks like a great start! I left some comments.
server/src/main/java/org/elasticsearch/common/geo/GeoPoint.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/geo/GeoPoint.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/GeoPointFieldMapper.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/geo/parsers/GeoWKTParser.java
Outdated
Show resolved
Hide resolved
-fix parameters in docs -use WellKnownText parser -add negative tests
@elasticmachine test this please |
I've found the cause of SQL query failure. I'll see what can be done with it. |
Perhaps the division of logic between FieldMapper parser and GeoUtil is not quite right. |
The reason was in code duplication. Namely, the same check |
@elasticmachine test this please |
Do you have any idea why these tests failed? Something flaky again? Maybe I need to merge with master? |
@elasticmachine run elasticsearch-ci/bwc |
Yeah, might be good idea to merge in master. |
Merged. |
@elasticmachine test this please |
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.
awesome @Hohol, looks great!
I just left one comment I thought would help others. let me know what you think!
@talevy, done. |
thanks! @elasticmachine test this please |
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
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. Thanks!
This PR adds support for parsing geo_point values from WKT POINT format. Also, a few minor bugs in geo_point parsing were fixed. Closes #41821
Relates: elastic/elasticsearch#44107 This commit adds support for Well Known Text (WKT) representations for GeoLocation, the type used to represent geo_point in the client. Similar to WKT support in IGeoShape, an internal format field is used to store whether an instance was deserialized from JSON or WKT, so that re-serialization honours the original form deserialized from.
Relates: elastic/elasticsearch#44107 This commit adds support for Well Known Text (WKT) representations for GeoLocation, the type used to represent geo_point in the client. Similar to WKT support in IGeoShape, an internal format field is used to store whether an instance was deserialized from JSON or WKT, so that re-serialization honours the original form deserialized from.
Relates: elastic/elasticsearch#44107 This commit adds support for Well Known Text (WKT) representations for GeoLocation, the type used to represent geo_point in the client. Similar to WKT support in IGeoShape, an internal format field is used to store whether an instance was deserialized from JSON or WKT, so that re-serialization honours the original form deserialized from. (cherry picked from commit 3f3f98c)
Relates: elastic/elasticsearch#44107 This commit adds support for Well Known Text (WKT) representations for GeoLocation, the type used to represent geo_point in the client. Similar to WKT support in IGeoShape, an internal format field is used to store whether an instance was deserialized from JSON or WKT, so that re-serialization honours the original form deserialized from. (cherry picked from commit 3f3f98c)
This PR adds support for parsing
geo_point
values from WKT POINT format.Also, a few minor bugs in
geo_point
parsing were fixed.Closes #41821