Min Aggregation Usageedit

Fluent DSL exampleedit

s => s
.Aggregations(a => a
    .Min("min_last_activity", m => m
        .Field(p => p.LastActivity)
    )
)

Object Initializer syntax exampleedit

new SearchRequest<Project>
{
    Aggregations = new MinAggregation("min_last_activity", Field<Project>(p => p.LastActivity))
}

Example json output. 

{
  "aggs": {
    "min_last_activity": {
      "min": {
        "field": "lastActivity"
      }
    }
  }
}

Handling Responsesedit

response.ShouldBeValid();
var min = response.Aggs.Min("min_last_activity");
min.Should().NotBeNull();
min.Value.Should().BeGreaterThan(0);
min.ValueAsString.Should().NotBeNullOrEmpty();