NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Max Aggregation Usage
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Max Aggregation Usage
editFluent DSL example
edita => a
.Max("max_commits", m => m
.Field(p => p.NumberOfCommits)
)
Object Initializer syntax example
editnew MaxAggregation("max_commits", Field<Project>(p => p.NumberOfCommits))
Example json output.
{
"max_commits": {
"max": {
"field": "numberOfCommits"
}
}
}
Handling Responses
editresponse.ShouldBeValid();
var max = response.Aggregations.Max("max_commits");
max.Should().NotBeNull();
max.Value.Should().BeGreaterThan(0);