use of org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.Min in project graylog2-server by Graylog2.
the class ESPivotTest method createTimestampRangeAggregations.
private Aggregations createTimestampRangeAggregations(Double min, Double max) {
final Min timestampMinAggregation = mock(Min.class);
when(timestampMinAggregation.getValue()).thenReturn(min);
when(timestampMinAggregation.getName()).thenReturn("timestamp-min");
final Max timestampMaxAggregation = mock(Max.class);
when(timestampMaxAggregation.getValue()).thenReturn(max);
when(timestampMaxAggregation.getName()).thenReturn("timestamp-max");
return new Aggregations(ImmutableList.of(timestampMinAggregation, timestampMaxAggregation));
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.Min in project graylog2-server by Graylog2.
the class ESMinHandler method doCreateAggregation.
@Nonnull
@Override
public Optional<AggregationBuilder> doCreateAggregation(String name, Pivot pivot, Min minSpec, ESPivot searchTypeHandler, ESGeneratedQueryContext queryContext) {
final MinAggregationBuilder min = AggregationBuilders.min(name).field(minSpec.field());
record(queryContext, pivot, minSpec, name, org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.Min.class);
return Optional.of(min);
}
Aggregations