File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,10 @@ class GeohashGrid(Bucket):
212
212
name = "geohash_grid"
213
213
214
214
215
+ class GeohexGrid (Bucket ):
216
+ name = "geohex_grid"
217
+
218
+
215
219
class GeotileGrid (Bucket ):
216
220
name = "geotile_grid"
217
221
Original file line number Diff line number Diff line change @@ -262,6 +262,12 @@ def test_geohash_grid_aggregation():
262
262
assert {"geohash_grid" : {"field" : "centroid" , "precision" : 3 }} == a .to_dict ()
263
263
264
264
265
+ def test_geohex_grid_aggregation ():
266
+ a = aggs .GeohexGrid (** {"field" : "centroid" , "precision" : 3 })
267
+
268
+ assert {"geohex_grid" : {"field" : "centroid" , "precision" : 3 }} == a .to_dict ()
269
+
270
+
265
271
def test_geotile_grid_aggregation ():
266
272
a = aggs .GeotileGrid (** {"field" : "centroid" , "precision" : 3 })
267
273
You can’t perform that action at this time.
0 commit comments