-
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
[Geo] Refactor GeoShapeQueryBuilder to derive from AbstractGeometryQueryBuilder #44780
[Geo] Refactor GeoShapeQueryBuilder to derive from AbstractGeometryQueryBuilder #44780
Conversation
Refactors GeoShapeQueryBuilder to derive from a new AbstractShapeQueryBuilder that provides common parsing and build logic for spatial shapes. This will allow development of custom shape queries by extending AbstractShapeQueryBuilder preventing duplication of common shape query logic.
@elasticmachine run elasticsearch-ci/1 |
It looks good in general but let's get #44715 in first and merge it into this one. I think it should dramatically simplify |
I agree on getting #44715 in first (I'm already merging it with this dev branch as part of the PR review). We're also going to need to be careful about naming because the field type that exposes Lucene's |
I merged #44715 into master. Thanks for the review! |
np; and I just merged those changes from master w/ this PR. Let's see how CI responds and I think this will be good to go. Per our team discuss this morning I renamed |
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!
private static Shape buildS4J(Geometry geometry) { | ||
return geometryToShapeBuilder(geometry).buildS4J(); | ||
} | ||
|
||
private Query getVectorQuery(QueryShardContext context, Geometry queryShape) { |
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 in the next iteration I am going to move this into AbstractGeometryIndexer
and make it obtainable from QueryShardContext
.
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.
Do you want to also @deprecate
it in 8.0 (master) in advance of its removal in 9.0?
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.
Oh... oops.. Sorry, you were referring to getVectorQuery
. I think that's a great idea.
…eryBuilder (#44780) Refactors GeoShapeQueryBuilder to derive from a new AbstractGeometryQueryBuilder that provides common parsing and build logic for spatial geometries. This will allow development of custom geometry queries by extending AbstractGeometryQueryBuilder preventing duplication of common spatial query logic.
Refactors
GeoShapeQueryBuilder
to derive from a newAbstractShapeQueryBuilder
that provides common parsing and build logic for spatial shapes. This will allow development of custom shape queries by extendingAbstractShapeQueryBuilder
, preventing the duplication of common shape query logic.note: #44715 further deprecates ShapeBuilder to make the QueryBuilder more spatial agnostic and will be included upon merge.
Relates to #40908