-
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
add shape-type metadata to geo_shape's doc-value #50104
Conversation
This commit serializes the ShapeType of the indexed geometry. The ShapeType can be useful for other future features. For one thing: elastic#49887 depends on the ability to determine what the highest dimensional shape is for centroid calculations. GeometryCollection is reduced to the sub-shape of the higest dimension relates elastic#37206.
these Extent assertions were breaking tests where rectangles that crossed the dateline were added. These assertions are not required within the Extent logic since it is prepared for bounding boxes that span the dateline
Pinging @elastic/es-analytics-geo (:Analytics/Geo) |
server/src/main/java/org/elasticsearch/common/geo/TriangleTreeReader.java
Outdated
Show resolved
Hide resolved
This reverts commit cd77db6.
@iverase I tried introducing a new What is not included -> a conversion from DimensionalShapeType -> ShapeType. This would only be useful when implementing #49569 |
run elasticsearch-ci/bwc |
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.
In general looks good. I just think the dimensional type should be part of the centroid and should be skipped when getting the extent.
server/src/main/java/org/elasticsearch/common/geo/TriangleTreeReader.java
Outdated
Show resolved
Hide resolved
run elasticsearch-ci/1 |
run elasticsearch-ci/1 |
@@ -33,8 +33,8 @@ | |||
* relations against the serialized triangle tree. | |||
*/ | |||
public class TriangleTreeReader { | |||
private static final int CENTROID_HEADER_SIZE_IN_BYTES = 9; |
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.
Maybe add a comment where this 9 bytes are coming from.
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 will update this in the follow-up PR when this is modified to include the centroid weight!
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.
Just left a small comment. LGTM
thanks Ignacio! |
This commit serializes the ShapeType of the indexed geometry. The ShapeType can be useful for other future features. For one thing: #49887 depends on the ability to determine what the highest dimensional shape is for centroid calculations. GeometryCollection is reduced to the sub-shape of the highest dimension relates #37206.
This commit serializes the ShapeType of the indexed
geometry. The ShapeType can be useful for other future
features. For one thing: #49887 depends on the ability
to determine what the highest dimensional shape is
for centroid calculations.
Since GeometryCollection is opaque, an additional
piece of data about the highest-dimension contained
within it is serialized and resolved at the time of reading.
This overhead is only present when indexing GeometryCollection.
relates #49569, #37206.