Search in sources :

Example 6 with ExtendedStatsAggregationBuilder

use of org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder in project graylog2-server by Graylog2.

the class ESVarianceHandler method doCreateAggregation.

@Nonnull
@Override
public Optional<AggregationBuilder> doCreateAggregation(String name, Pivot pivot, Variance varianceSpec, ESPivot searchTypeHandler, ESGeneratedQueryContext queryContext) {
    final ExtendedStatsAggregationBuilder variance = AggregationBuilders.extendedStats(name).field(varianceSpec.field());
    record(queryContext, pivot, varianceSpec, name, ExtendedStatsAggregation.class);
    return Optional.of(variance);
}
Also used : ExtendedStatsAggregationBuilder(org.graylog.shaded.elasticsearch6.org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder) Nonnull(javax.annotation.Nonnull)

Aggregations

Nonnull (javax.annotation.Nonnull)3 ExtendedStatsAggregationBuilder (org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder)3 ExtendedStatsAggregationBuilder (org.graylog.shaded.elasticsearch6.org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder)3 IndexReader (org.apache.lucene.index.IndexReader)1 RandomIndexWriter (org.apache.lucene.index.RandomIndexWriter)1 IndexSearcher (org.apache.lucene.search.IndexSearcher)1 MatchAllDocsQuery (org.apache.lucene.search.MatchAllDocsQuery)1 Directory (org.apache.lucene.store.Directory)1 SearchPlugin (org.elasticsearch.plugins.SearchPlugin)1 AggregationSpec (org.elasticsearch.plugins.SearchPlugin.AggregationSpec)1 PipelineAggregationSpec (org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec)1 AbstractAggregationBuilder (org.elasticsearch.search.aggregations.AbstractAggregationBuilder)1 AdjacencyMatrixAggregationBuilder (org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder)1 ChildrenAggregationBuilder (org.elasticsearch.search.aggregations.bucket.children.ChildrenAggregationBuilder)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1 FiltersAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filters.FiltersAggregationBuilder)1 GeoGridAggregationBuilder (org.elasticsearch.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder)1 GlobalAggregationBuilder (org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder)1 DateHistogramAggregationBuilder (org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder)1 HistogramAggregationBuilder (org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder)1