diff --git a/elasticsearch_dsl/aggs.py b/elasticsearch_dsl/aggs.py index 547a5931a..3e8689206 100644 --- a/elasticsearch_dsl/aggs.py +++ b/elasticsearch_dsl/aggs.py @@ -306,6 +306,10 @@ class ExtendedStats(Agg): name = "extended_stats" +class Boxplot(Agg): + name = "boxplot" + + class GeoBounds(Agg): name = "geo_bounds" diff --git a/test_elasticsearch_dsl/test_aggs.py b/test_elasticsearch_dsl/test_aggs.py index a2317c995..bc953338d 100644 --- a/test_elasticsearch_dsl/test_aggs.py +++ b/test_elasticsearch_dsl/test_aggs.py @@ -266,3 +266,9 @@ def test_geotile_grid_aggregation(): a = aggs.GeotileGrid(**{"field": "centroid", "precision": 3}) assert {"geotile_grid": {"field": "centroid", "precision": 3}} == a.to_dict() + + +def test_boxplot_aggregation(): + a = aggs.Boxplot(field="load_time") + + assert {"boxplot": {"field": "load_time"}} == a.to_dict()