Search in sources :

Example 6 with MinAggregationBuilder

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder 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);
}
Also used : MinAggregationBuilder(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder) Nonnull(javax.annotation.Nonnull)

Aggregations

MinAggregationBuilder (org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder)4 Test (org.junit.Test)4 BoolQueryBuilder (org.elasticsearch.index.query.BoolQueryBuilder)3 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)3 MinAggregationBuilder (org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder)2 Nonnull (javax.annotation.Nonnull)1 BucketSpec (org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec)1 AggregationBuilder (org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.AggregationBuilder)1 MaxAggregationBuilder (org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.MaxAggregationBuilder)1 SearchSourceBuilder (org.graylog.shaded.elasticsearch7.org.elasticsearch.search.builder.SearchSourceBuilder)1