Search in sources :

Example 1 with SumAggregationBuilder

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.SumAggregationBuilder in project graylog2-server by Graylog2.

the class ESSumHandler method doCreateAggregation.

@Nonnull
@Override
public Optional<AggregationBuilder> doCreateAggregation(String name, Pivot pivot, Sum sumSpec, ESPivot searchTypeHandler, ESGeneratedQueryContext queryContext) {
    final SumAggregationBuilder sum = AggregationBuilders.sum(name).field(sumSpec.field());
    record(queryContext, pivot, sumSpec, name, org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.Sum.class);
    return Optional.of(sum);
}
Also used : SumAggregationBuilder(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.SumAggregationBuilder) Nonnull(javax.annotation.Nonnull)

Aggregations

Nonnull (javax.annotation.Nonnull)1 SumAggregationBuilder (org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.SumAggregationBuilder)1