You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relates: elastic/elasticsearch#51948
This commit implements the boxplot aggregation.
Integration tests run against XPackCluster because
it requires a license to use.
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/Aggregations/Metric/Boxplot/BoxplotAggregationUsageTests.cs.
11
+
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
12
+
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
13
+
////
14
+
15
+
[[boxplot-aggregation-usage]]
16
+
=== Boxplot Aggregation Usage
17
+
18
+
A boxplot metrics aggregation that computes boxplot of numeric values extracted from the aggregated documents.
19
+
These values can be generated by a provided script or extracted from specific numeric or histogram fields in the documents.
20
+
21
+
boxplot aggregation returns essential information for making a box plot: minimum, maximum median, first quartile (25th percentile)
22
+
and third quartile (75th percentile) values.
23
+
24
+
Be sure to read the Elasticsearch documentation on {ref_current}/search-aggregations-metrics-boxplot-aggregation.html[Boxplot Aggregation]
25
+
26
+
==== Fluent DSL example
27
+
28
+
[source,csharp]
29
+
----
30
+
a => a
31
+
.Boxplot("boxplot_commits", plot => plot
32
+
.Meta(m => m
33
+
.Add("foo", "bar")
34
+
)
35
+
.Field(p => p.NumberOfCommits)
36
+
.Missing(10)
37
+
.Compression(100)
38
+
)
39
+
----
40
+
41
+
==== Object Initializer syntax example
42
+
43
+
[source,csharp]
44
+
----
45
+
new BoxplotAggregation("boxplot_commits", Field<Project>(p => p.NumberOfCommits))
46
+
{
47
+
Meta = new Dictionary<string, object>
48
+
{
49
+
{ "foo", "bar" }
50
+
},
51
+
Missing = 10,
52
+
Compression = 100
53
+
}
54
+
----
55
+
56
+
[source,javascript]
57
+
.Example json output
58
+
----
59
+
{
60
+
"boxplot_commits": {
61
+
"meta": {
62
+
"foo": "bar"
63
+
},
64
+
"boxplot": {
65
+
"field": "numberOfCommits",
66
+
"missing": 10.0,
67
+
"compression": 100.0
68
+
}
69
+
}
70
+
}
71
+
----
72
+
73
+
==== Handling Responses
74
+
75
+
[source,csharp]
76
+
----
77
+
response.ShouldBeValid();
78
+
var boxplot = response.Aggregations.Boxplot("boxplot_commits");
0 commit comments