WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Min Aggregation Usage
editMin Aggregation Usage
editFluent DSL example
edits => s .Aggregations(a => a .Min("min_last_activity", m => m .Field(p => p.LastActivity) ) )
Object Initializer syntax example
editnew SearchRequest<Project> { Aggregations = new MinAggregation("min_last_activity", Field<Project>(p => p.LastActivity)) }
Example json output.
{ "aggs": { "min_last_activity": { "min": { "field": "lastActivity" } } } }
Handling Responses
editresponse.ShouldBeValid(); var min = response.Aggs.Min("min_last_activity"); min.Should().NotBeNull(); min.Value.Should().BeGreaterThan(0); min.ValueAsString.Should().NotBeNullOrEmpty();