IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Extended Stats Aggregation Usage
editExtended Stats Aggregation Usage
editFluent DSL example
edita => a .ExtendedStats("commit_stats", es => es .Field(p => p.NumberOfCommits) .Sigma(1) )
Object Initializer syntax example
editnew ExtendedStatsAggregation("commit_stats", Field<Project>(p => p.NumberOfCommits)) { Sigma = 1 }
Example json output.
{ "commit_stats": { "extended_stats": { "field": "numberOfCommits", "sigma": 1.0 } } }
Handling Responses
editresponse.ShouldBeValid(); var commitStats = response.Aggregations.ExtendedStats("commit_stats"); commitStats.Should().NotBeNull(); commitStats.Average.Should().BeGreaterThan(0); commitStats.Max.Should().BeGreaterThan(0); commitStats.Min.Should().BeGreaterThan(0); commitStats.Count.Should().BeGreaterThan(0); commitStats.Sum.Should().BeGreaterThan(0); commitStats.SumOfSquares.Should().BeGreaterThan(0); commitStats.StdDeviation.Should().BeGreaterThan(0); commitStats.StdDeviationBounds.Should().NotBeNull(); commitStats.StdDeviationBounds.Upper.Should().BeGreaterThan(0); commitStats.StdDeviationBounds.Lower.Should().NotBe(0);