Repository: elastic/elasticsearch-dsl-py

Issue:
"boxplot" is not available as an aggregation
ES 7.x includes the "boxplot" [aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-aggregations-metrics-boxplot-aggregation.html#_syntax), which will return the max, min and 25/50/75 percentiles (1st, 2nd, 3rd quartiles) values - the source for a [boxplot chart](https://en.wikipedia.org/wiki/Box_plot).

`elasticsearch_dsl` does not currently support this, and raises an error if you try to create it:

```
elasticsearch_dsl.exceptions.UnknownDslObject: DSL class `boxplot` does not exist in agg.
```


Discussion:

Patch:
diff --git a/elasticsearch_dsl/aggs.py b/elasticsearch_dsl/aggs.py
index 547a593..3e86892 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"
 


Test patch:
diff --git a/test_elasticsearch_dsl/test_aggs.py b/test_elasticsearch_dsl/test_aggs.py
index a2317c9..bc95333 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()