File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,9 @@ class GeoDistance(Bucket):
174
174
class GeohashGrid (Bucket ):
175
175
name = 'geohash_grid'
176
176
177
+ class GeotileGrid (Bucket ):
178
+ name = 'geotile_grid'
179
+
177
180
class GeoCentroid (Bucket ):
178
181
name = 'geo_centroid'
179
182
Original file line number Diff line number Diff line change @@ -252,3 +252,23 @@ def test_bucket_sort_agg_only_trnunc():
252
252
}
253
253
}
254
254
} == a .to_dict ()
255
+
256
+ def test_geohash_grid_aggregation ():
257
+ a = aggs .GeohashGrid (** {'field' : 'centroid' , 'precision' : 3 })
258
+
259
+ assert {
260
+ 'geohash_grid' : {
261
+ 'field' : 'centroid' ,
262
+ 'precision' : 3
263
+ }
264
+ } == a .to_dict ()
265
+
266
+ def test_geotile_grid_aggregation ():
267
+ a = aggs .GeotileGrid (** {'field' : 'centroid' , 'precision' : 3 })
268
+
269
+ assert {
270
+ 'geotile_grid' : {
271
+ 'field' : 'centroid' ,
272
+ 'precision' : 3
273
+ }
274
+ } == a .to_dict ()
You can’t perform that action at this time.
0 commit comments