-
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
Geo: Switch generated GeoJson type names to camel case (#50285) #50400
Conversation
Switches generated WKT to upper case to conform to the standard recommendation. Closes elastic#49568
Pinging @elastic/es-analytics-geo (:Analytics/Geo) |
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.
I think you meant GeoJson, not WKT?
@@ -382,7 +382,7 @@ public static String getGeoJsonName(Geometry geometry) { | |||
return geometry.visit(new GeometryVisitor<>() { | |||
@Override | |||
public String visit(Circle circle) { | |||
return "circle"; | |||
return "CIRCLE"; |
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.
this is for GeoJSON, not WKT. right?
these should all be capitalized using upper-camel-case/pascal-case
Circle
, MultiLineString
...
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.
Indeed! Got carried away :)
@elasticmachine update branch |
...patial/src/test/java/org/elasticsearch/xpack/spatial/index/query/ShapeQueryBuilderTests.java
Show resolved
Hide resolved
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/2 |
Switches generated GeoJson type names to camel case to conform to the standard. Closes #49568
elastic#50400) Switches generated GeoJson type names to camel case to conform to the standard. Closes elastic#49568
Hi @imotov |
Hi @jennet, This is right, this change was done on 7.6.0 but it does not mean that you get all geojson not in camelcase. Let me explain. Lets create an index an insert to points on with camel case and one without:
If you do a search without specifying how to retrieve the values, it returns the
One the other hand in 7.16 you can use the fields parameter in the request bodyto return data formatted in geojson. In that case both points are camel case:
Hope this helps. |
Switches generated GeoJson type names to camel case
to conform to the standard.
Closes #49568