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 @@ -209,6 +209,10 @@ class GeohashGrid(Bucket):
209
209
name = "geohash_grid"
210
210
211
211
212
+ class GeohexGrid (Bucket ):
213
+ name = "geohex_grid"
214
+
215
+
212
216
class GeotileGrid (Bucket ):
213
217
name = "geotile_grid"
214
218
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