Skip to content
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 geohash, geotile, and geobounds aggregation on geoshapes documentation #4517

Merged
merged 10 commits into from
Jul 18, 2023

Conversation

kolchfa-aws
Copy link
Collaborator

Fixes #861

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@kolchfa-aws kolchfa-aws self-assigned this Jul 12, 2023
@kolchfa-aws kolchfa-aws marked this pull request as ready for review July 12, 2023 16:19
@kolchfa-aws
Copy link
Collaborator Author

@navneet1v I've verified all requests against the endpoint you provided and they all work. Could you review this PR for technical accuracy please?

@kolchfa-aws kolchfa-aws changed the title Add geohash and geotile grid aggregation on geoshapes documentation Add geohash, geotile, and geobounds aggregation on geoshapes documentation Jul 12, 2023
@kolchfa-aws kolchfa-aws added 3 - Tech review PR: Tech review in progress release-notes PR: Include this PR in the automated release notes v2.9.0 labels Jul 13, 2023
@kolchfa-aws kolchfa-aws added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Jul 15, 2023
Copy link
Contributor

@vagimeli vagimeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One change

_query-dsl/aggregations/bucket/geohash-grid.md Outdated Show resolved Hide resolved
Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kolchfa-aws Please see my comments and changes and let me know if you have any questions. Thanks!

_query-dsl/aggregations/bucket/geohash-grid.md Outdated Show resolved Hide resolved
_query-dsl/aggregations/bucket/geohash-grid.md Outdated Show resolved Hide resolved

## Aggregating geoshapes

To aggregate on geoshape fields, first create an index and map the `location` field as a `geo_shape`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"To run an aggregation on a geoshape field"?

_query-dsl/aggregations/bucket/geohash-grid.md Outdated Show resolved Hide resolved
@@ -8,7 +8,7 @@ nav_order: 80

# Geohash grid aggregations

The `geohash_grid` aggregation buckets documents for geographical analysis. It organizes a geographical region into a grid of smaller regions of different sizes or precisions. Lower values of precision represent larger geographical areas and higher values represent smaller, more precise geographical areas.
The `geohash_grid` aggregation buckets documents for geographical analysis. It organizes a geographical region into a grid of smaller regions of different sizes or precisions. Lower values of precision represent larger geographical areas and higher values represent smaller, more precise geographical areas. You can aggregate documents on [geopoint]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-point/) or [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) fields using a geohash grid aggregation. One notable difference is that a geopoint is only present in one bucket, but a geoshape is counted in all geohash grid cells with which it intersects.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"You can run a document aggregation on a geopoint or geoshape field..."?

_query-dsl/aggregations/bucket/geotile-grid.md Outdated Show resolved Hide resolved
_query-dsl/aggregations/metric/geobounds.md Outdated Show resolved Hide resolved
## Aggregating geoshapes

To aggregate on geoshape fields, first create an index and map the `location` field as a `geo_shape`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"To run an aggregation on a geoshape field"?

{% include copy-curl.html %}

The optional `wrap_longitude` parameter specifies whether the bounding box returned by the aggregation can overlap the international date line (180&deg; meridian). If `wrap_longitude` is set to `true`, the bounding box can overlap the international date line and return a bounds where the lower-left longitude is larger than the upper-right longitude. The default value for `wrap_longitude` is `true`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"return a bounds" reads oddly to me. Do we mean "return boundaries"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded

_query-dsl/aggregations/metric/geobounds.md Outdated Show resolved Hide resolved
@kolchfa-aws kolchfa-aws merged commit 42e8a1b into main Jul 18, 2023
@prudhvigodithi prudhvigodithi added 3 - Done Issue is done/complete and removed 3 - Done Issue is done/complete labels Oct 3, 2023
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
…ation (opensearch-project#4517)

* Add geohash and geotile grid aggregation on geoshapes documentation

Signed-off-by: Fanit Kolchina <[email protected]>

* Add copy buttons and details blocks

Signed-off-by: Fanit Kolchina <[email protected]>

* Add note about geoshape agg not supported for visualizations

Signed-off-by: Fanit Kolchina <[email protected]>

* Update _query-dsl/aggregations/bucket/geohash-grid.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Add editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Reworded bounds

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
vagimeli added a commit that referenced this pull request Dec 21, 2023
…ation (#4517)

* Add geohash and geotile grid aggregation on geoshapes documentation

Signed-off-by: Fanit Kolchina <[email protected]>

* Add copy buttons and details blocks

Signed-off-by: Fanit Kolchina <[email protected]>

* Add note about geoshape agg not supported for visualizations

Signed-off-by: Fanit Kolchina <[email protected]>

* Update _query-dsl/aggregations/bucket/geohash-grid.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Add editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Reworded bounds

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
@Naarcha-AWS Naarcha-AWS deleted the geo-agg-update branch March 28, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Doc review PR: Doc review in progress release-notes PR: Include this PR in the automated release notes v2.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] : Geo Shape Aggregation Documentation
5 participants