Adds support for geo-bounds filtering in geogrid aggregations#50002
Merged
talevy merged 17 commits intoelastic:masterfrom Jan 14, 2020
Merged
Adds support for geo-bounds filtering in geogrid aggregations#50002talevy merged 17 commits intoelastic:masterfrom
talevy merged 17 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytics-geo (:Analytics/Geo) |
talevy
commented
Dec 9, 2019
server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/CellIdSource.java
Outdated
Show resolved
Hide resolved
talevy
commented
Dec 10, 2019
server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/CellIdSource.java
Outdated
Show resolved
Hide resolved
nknize
suggested changes
Dec 13, 2019
Contributor
nknize
left a comment
There was a problem hiding this comment.
Overall it looks good. Left a few minor thoughts and suggestions. At minimum I think we should use the Lucene test utilities where we can. Separate from that I think we can introduce a little more randomization to the tests.
docs/reference/aggregations/bucket/geohashgrid-aggregation.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/aggregations/bucket/geotilegrid-aggregation.asciidoc
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/geo/GeoUtils.java
Outdated
Show resolved
Hide resolved
...a/org/elasticsearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilder.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java
Outdated
Show resolved
Hide resolved
...est/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoGridAggregatorTestCase.java
Outdated
Show resolved
Hide resolved
Both geo_bounding_box query and geo_bounds aggregation have a very similar definition of a "bounding box". A lot of this logic (serialization, xcontent-parsing, etc) can be centralized instead of having separated efforts to do the same things
f9ae11c to
0a69a33
Compare
It is fairly common to filter the geo point candidates in geohash_grid and geotile_grid aggregations according to some viewable bounding box. This change introduces the option of specifying this filter directly in the tiling aggregation.
0a69a33 to
af29e5e
Compare
iverase
reviewed
Jan 9, 2020
Contributor
iverase
left a comment
There was a problem hiding this comment.
I think this is almost there, just want to think if we should use different implementations for the bounded and unbounded case when iterating doc values.
server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/CellIdSource.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@elasticmachine update branch thanks Ignacio! |
Contributor
Author
|
@elasticmachine update branch |
This was referenced Jan 14, 2020
talevy
added a commit
that referenced
this pull request
Jan 14, 2020
…50996) * Adds support for geo-bounds filtering in geogrid aggregations (#50002) It is fairly common to filter the geo point candidates in geohash_grid and geotile_grid aggregations according to some viewable bounding box. This change introduces the option of specifying this filter directly in the tiling aggregation. This is even more relevant to `geo_shape` where the bounds will restrict the shape to be within the bounds this optional `bounds` parameter is parsed in an equivalent fashion to the bounds specified in the geo_bounding_box query.
talevy
added a commit
that referenced
this pull request
Jan 14, 2020
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
…c#50002) It is fairly common to filter the geo point candidates in geohash_grid and geotile_grid aggregations according to some viewable bounding box. This change introduces the option of specifying this filter directly in the tiling aggregation. This is even more relevant to `geo_shape` where the bounds will restrict the shape to be within the bounds this optional `bounds` parameter is parsed in an equivalent fashion to the bounds specified in the geo_bounding_box query.
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
…fter elastic#50996 (elastic#50997) after elastic#50996 (backport of elastic#50002) merged, the version guard on geo-grid `bounds` parameter can be updated to 7.6 re-enables bwc tests
This was referenced Feb 3, 2020
russcam
added a commit
to elastic/elasticsearch-net
that referenced
this pull request
Feb 20, 2020
Relates: #4341, elastic/elasticsearch#50002 This commit adds support for supplying bounds on a geohash_grid aggregation, similar to how bounds are supplied on geo_bounding_box query.
Mpdreamz
pushed a commit
to elastic/elasticsearch-net
that referenced
this pull request
Feb 21, 2020
Relates: #4341, elastic/elasticsearch#50002 This commit adds support for supplying bounds on a geohash_grid aggregation, similar to how bounds are supplied on geo_bounding_box query.
github-actions bot
pushed a commit
to elastic/elasticsearch-net
that referenced
this pull request
Feb 21, 2020
Relates: #4341, elastic/elasticsearch#50002 This commit adds support for supplying bounds on a geohash_grid aggregation, similar to how bounds are supplied on geo_bounding_box query.
Mpdreamz
pushed a commit
to elastic/elasticsearch-net
that referenced
this pull request
Feb 21, 2020
) Relates: #4341, elastic/elasticsearch#50002 This commit adds support for supplying bounds on a geohash_grid aggregation, similar to how bounds are supplied on geo_bounding_box query. Co-authored-by: Russ Cam <russ.cam@elastic.co>
russcam
added a commit
to elastic/elasticsearch-net
that referenced
this pull request
Feb 23, 2020
Relates: #4341, elastic/elasticsearch#50002 This commit adds support for supplying bounds on a geohash_grid aggregation, similar to how bounds are supplied on geo_bounding_box query. (cherry picked from commit 8ed67e3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is fairly common to filter the geo point candidates in
geohash_grid and geotile_grid aggregations according to some
viewable bounding box. This change introduces the option of
specifying this filter directly in the tiling aggregation.
This is even more relevant to
geo_shapewhere the bounds will restrictthe shape to be within the bounds
this optional
boundsparameter is parsed in an equivalent fashion tothe bounds specified in the geo_bounding_box query.
example: