Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions elasticsearch_dsl/aggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ class GeohashGrid(Bucket):
name = "geohash_grid"


class GeohexGrid(Bucket):
name = "geohex_grid"


class GeotileGrid(Bucket):
name = "geotile_grid"

Expand Down
6 changes: 6 additions & 0 deletions tests/test_aggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ def test_geohash_grid_aggregation():
assert {"geohash_grid": {"field": "centroid", "precision": 3}} == a.to_dict()


def test_geohex_grid_aggregation():
a = aggs.GeohexGrid(**{"field": "centroid", "precision": 3})

assert {"geohex_grid": {"field": "centroid", "precision": 3}} == a.to_dict()


def test_geotile_grid_aggregation():
a = aggs.GeotileGrid(**{"field": "centroid", "precision": 3})

Expand Down