Skip to content

Commit 1eebba3

Browse files
committed
Additional edits and fixes
1 parent aef42db commit 1eebba3

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

docs/reference/aggregations/bucket/geohexgrid-aggregation.asciidoc

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ resolutions] on how precision (zoom) correlates to size on the ground.
1717
Precision for this aggregation can be between 0 and 15, inclusive.
1818

1919
WARNING: High-precision requests can be very expensive in terms of RAM and
20-
result sizes. For example, the highest-precision geohex with a precision of `15`
20+
result sizes. For example, the highest-precision geohex with a precision of 15
2121
produces cells that cover less than 10cm by 10cm. We recommend you use a
2222
filter to limit high-precision requests to a smaller geographic area. For an example,
23-
refer to <<geohexgrid-high-precision-ex>>.
24-
25-
23+
refer to <<geohexgrid-high-precision>>.
2624

25+
[[geohexgrid-low-precision]]
2726
==== Simple low-precision request
2827

2928
[source,console,id=geohexgrid-aggregation-example]
@@ -94,11 +93,12 @@ Response:
9493
--------------------------------------------------
9594
// TESTRESPONSE[s/\.\.\./"took": $body.took,"_shards": $body._shards,"hits":$body.hits,"timed_out":false,/]
9695

96+
[[geohexgrid-high-precision]]
9797
==== High-precision requests
9898

99-
When requesting detailed buckets (typically for displaying a "zoomed in" map)
99+
When requesting detailed buckets (typically for displaying a "zoomed in" map),
100100
a filter like <<query-dsl-geo-bounding-box-query,geo_bounding_box>> should be
101-
applied to narrow the subject area otherwise potentially millions of buckets
101+
applied to narrow the subject area. Otherwise, potentially millions of buckets
102102
will be created and returned.
103103

104104
[source,console,id=geohexgrid-high-precision-ex]
@@ -129,6 +129,8 @@ POST /museums/_search?size=0
129129
--------------------------------------------------
130130
// TEST[continued]
131131

132+
Response:
133+
132134
[source,console-result]
133135
--------------------------------------------------
134136
{
@@ -158,13 +160,14 @@ POST /museums/_search?size=0
158160
--------------------------------------------------
159161
// TESTRESPONSE[s/\.\.\./"took": $body.took,"_shards": $body._shards,"hits":$body.hits,"timed_out":false,/]
160162

163+
[[geohexgrid-addtl-bounding-box-filtering]]
161164
==== Requests with additional bounding box filtering
162165

163166
The `geohex_grid` aggregation supports an optional `bounds` parameter
164-
that restricts the cells considered to those that intersects the
165-
provided bounds. The `bounds` parameter accepts the bounding box in
166-
all the same <<query-dsl-geo-bounding-box-query-accepted-formats,accepted formats>> of the
167-
bounds specified in the Geo Bounding Box Query. This bounding box can be used with or
167+
that restricts the cells considered to those that intersect the
168+
provided bounds. The `bounds` parameter accepts the same
169+
<<query-dsl-geo-bounding-box-query-accepted-formats,bounding box formats>>
170+
as the geo-bounding box query. This bounding box can be used with or
168171
without an additional `geo_bounding_box` query for filtering the points prior to aggregating.
169172
It is an independent bounding box that can intersect with, be equal to, or be disjoint
170173
to any additional `geo_bounding_box` queries defined in the context of the aggregation.
@@ -189,6 +192,8 @@ POST /museums/_search?size=0
189192
--------------------------------------------------
190193
// TEST[continued]
191194

195+
Response:
196+
192197
[source,console-result]
193198
--------------------------------------------------
194199
{
@@ -215,14 +220,18 @@ POST /museums/_search?size=0
215220
--------------------------------------------------
216221
// TESTRESPONSE[s/\.\.\./"took": $body.took,"_shards": $body._shards,"hits":$body.hits,"timed_out":false,/]
217222

223+
[[geohexgrid-options]]
218224
==== Options
219225

220226
[horizontal]
221-
field:: Mandatory. The name of the field indexed with GeoPoints.
222-
223-
precision:: Optional. The integer zoom of the key used to define
224-
cells/buckets in the results. Defaults to 6.
225-
Values outside of [0,15] will be rejected.
227+
field::
228+
(Required, string) Field containing indexed geo-point values. This field must be
229+
explicitly mapped as a <<geo-point,`geo_point`>> field. If the field contains an
230+
array, `geohex_grid` aggregates all array values.
231+
232+
precision::
233+
(Optional, integer) Integer zoom of the key used to define cells/buckets in
234+
the results. Defaults to `6`. Values outside of [`0`,`15`] will be rejected.
226235

227236
bounds::
228237
(Optional, object) Bounding box used to filter the geo-points in each bucket.

0 commit comments

Comments
 (0)