Repository: elastic/elasticsearch-dsl-py

Issue:
Add support for "geohex_grid" bucket aggregation
`elasticsearch_dsl/aggs.py` is missing "geohex_grid" bucket aggregation which is introduced in [v8.1.0](https://www.elastic.co/guide/en/elasticsearch/reference/8.1/release-notes-8.1.0.html#feature-8.1.0). [Geohex grid aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohexgrid-aggregation.html)

Discussion:

Patch:
diff --git a/elasticsearch_dsl/aggs.py b/elasticsearch_dsl/aggs.py
index d9412e2..69c2d85 100644
--- a/elasticsearch_dsl/aggs.py
+++ b/elasticsearch_dsl/aggs.py
@@ -209,6 +209,10 @@ class GeohashGrid(Bucket):
     name = "geohash_grid"
 
 
+class GeohexGrid(Bucket):
+    name = "geohex_grid"
+
+
 class GeotileGrid(Bucket):
     name = "geotile_grid"
 


Test patch:
diff --git a/tests/test_aggs.py b/tests/test_aggs.py
index 936c2bc..aa928de 100644
--- a/tests/test_aggs.py
+++ b/tests/test_aggs.py
@@ -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})