-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add IntervalsFuzzy as known replace (cherry picked from commit 0a59eb9) * update docs on 7.6
- Loading branch information
Showing
7 changed files
with
182 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
docs/aggregations/metric/string-stats/string-stats-aggregation-usage.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
:ref_current: https://www.elastic.co/guide/en/elasticsearch/reference/7.5 | ||
|
||
:github: https://github.com/elastic/elasticsearch-net | ||
|
||
:nuget: https://www.nuget.org/packages | ||
|
||
//// | ||
IMPORTANT NOTE | ||
============== | ||
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/7.x/src/Tests/Tests/Aggregations/Metric/StringStats/StringStatsAggregationUsageTests.cs. | ||
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file, | ||
please modify the original csharp file found at the link and submit the PR with that change. Thanks! | ||
//// | ||
|
||
[[string-stats-aggregation-usage]] | ||
=== String Stats Aggregation Usage | ||
|
||
==== Fluent DSL example | ||
|
||
[source,csharp] | ||
---- | ||
a => a | ||
.StringStats("name_stats", st => st | ||
.Field(p => p.Name) | ||
) | ||
---- | ||
|
||
==== Object Initializer syntax example | ||
|
||
[source,csharp] | ||
---- | ||
new StringStatsAggregation("name_stats", Field<Project>(p => p.Name)) | ||
---- | ||
|
||
[source,javascript] | ||
.Example json output | ||
---- | ||
{ | ||
"name_stats": { | ||
"string_stats": { | ||
"field": "name" | ||
} | ||
} | ||
} | ||
---- | ||
|
||
==== Handling Responses | ||
|
||
[source,csharp] | ||
---- | ||
response.ShouldBeValid(); | ||
var commitStats = response.Aggregations.StringStats("name_stats"); | ||
commitStats.Should().NotBeNull(); | ||
commitStats.AverageLength.Should().BeGreaterThan(0); | ||
commitStats.MaxLength.Should().BeGreaterThan(0); | ||
commitStats.MinLength.Should().BeGreaterThan(0); | ||
commitStats.Count.Should().BeGreaterThan(0); | ||
commitStats.Distribution.Should().NotBeNull().And.BeEmpty(); | ||
---- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters