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
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/7.x/src/Tests/Tests/Aggregations/Metric/StringStats/StringStatsAggregationUsageTests.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
+
[[string-stats-aggregation-usage]]
16
+
=== String Stats Aggregation Usage
17
+
18
+
==== Fluent DSL example
19
+
20
+
[source,csharp]
21
+
----
22
+
a => a
23
+
.StringStats("name_stats", st => st
24
+
.Field(p => p.Name)
25
+
)
26
+
----
27
+
28
+
==== Object Initializer syntax example
29
+
30
+
[source,csharp]
31
+
----
32
+
new StringStatsAggregation("name_stats", Field<Project>(p => p.Name))
33
+
----
34
+
35
+
[source,javascript]
36
+
.Example json output
37
+
----
38
+
{
39
+
"name_stats": {
40
+
"string_stats": {
41
+
"field": "name"
42
+
}
43
+
}
44
+
}
45
+
----
46
+
47
+
==== Handling Responses
48
+
49
+
[source,csharp]
50
+
----
51
+
response.ShouldBeValid();
52
+
var commitStats = response.Aggregations.StringStats("name_stats");
0 commit comments