Search in sources :

Example 1 with ExtendedStatsBucketPipelineAggregationBuilder

use of org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregationBuilder in project OpenSearch by opensearch-project.

the class SearchModule method registerPipelineAggregations.

private void registerPipelineAggregations(List<SearchPlugin> plugins) {
    registerPipelineAggregation(new PipelineAggregationSpec(DerivativePipelineAggregationBuilder.NAME, DerivativePipelineAggregationBuilder::new, DerivativePipelineAggregator::new, DerivativePipelineAggregationBuilder::parse).addResultReader(InternalDerivative::new));
    registerPipelineAggregation(new PipelineAggregationSpec(MaxBucketPipelineAggregationBuilder.NAME, MaxBucketPipelineAggregationBuilder::new, MaxBucketPipelineAggregator::new, MaxBucketPipelineAggregationBuilder.PARSER).addResultReader(InternalBucketMetricValue.NAME, InternalBucketMetricValue::new));
    registerPipelineAggregation(new PipelineAggregationSpec(MinBucketPipelineAggregationBuilder.NAME, MinBucketPipelineAggregationBuilder::new, MinBucketPipelineAggregator::new, MinBucketPipelineAggregationBuilder.PARSER));
    registerPipelineAggregation(new PipelineAggregationSpec(AvgBucketPipelineAggregationBuilder.NAME, AvgBucketPipelineAggregationBuilder::new, AvgBucketPipelineAggregator::new, AvgBucketPipelineAggregationBuilder.PARSER).addResultReader(InternalSimpleValue.NAME, InternalSimpleValue::new));
    registerPipelineAggregation(new PipelineAggregationSpec(SumBucketPipelineAggregationBuilder.NAME, SumBucketPipelineAggregationBuilder::new, SumBucketPipelineAggregator::new, SumBucketPipelineAggregationBuilder.PARSER));
    registerPipelineAggregation(new PipelineAggregationSpec(StatsBucketPipelineAggregationBuilder.NAME, StatsBucketPipelineAggregationBuilder::new, StatsBucketPipelineAggregator::new, StatsBucketPipelineAggregationBuilder.PARSER).addResultReader(InternalStatsBucket::new));
    registerPipelineAggregation(new PipelineAggregationSpec(ExtendedStatsBucketPipelineAggregationBuilder.NAME, ExtendedStatsBucketPipelineAggregationBuilder::new, ExtendedStatsBucketPipelineAggregator::new, new ExtendedStatsBucketParser()).addResultReader(InternalExtendedStatsBucket::new));
    registerPipelineAggregation(new PipelineAggregationSpec(PercentilesBucketPipelineAggregationBuilder.NAME, PercentilesBucketPipelineAggregationBuilder::new, PercentilesBucketPipelineAggregator::new, PercentilesBucketPipelineAggregationBuilder.PARSER).addResultReader(InternalPercentilesBucket::new));
    registerPipelineAggregation(new PipelineAggregationSpec(MovAvgPipelineAggregationBuilder.NAME, MovAvgPipelineAggregationBuilder::new, MovAvgPipelineAggregator::new, (XContentParser parser, String name) -> MovAvgPipelineAggregationBuilder.parse(movingAverageModelParserRegistry, name, parser)));
    registerPipelineAggregation(new PipelineAggregationSpec(CumulativeSumPipelineAggregationBuilder.NAME, CumulativeSumPipelineAggregationBuilder::new, CumulativeSumPipelineAggregator::new, CumulativeSumPipelineAggregationBuilder.PARSER));
    registerPipelineAggregation(new PipelineAggregationSpec(BucketScriptPipelineAggregationBuilder.NAME, BucketScriptPipelineAggregationBuilder::new, BucketScriptPipelineAggregator::new, BucketScriptPipelineAggregationBuilder.PARSER));
    registerPipelineAggregation(new PipelineAggregationSpec(BucketSelectorPipelineAggregationBuilder.NAME, BucketSelectorPipelineAggregationBuilder::new, BucketSelectorPipelineAggregator::new, BucketSelectorPipelineAggregationBuilder::parse));
    registerPipelineAggregation(new PipelineAggregationSpec(BucketSortPipelineAggregationBuilder.NAME, BucketSortPipelineAggregationBuilder::new, BucketSortPipelineAggregator::new, BucketSortPipelineAggregationBuilder::parse));
    registerPipelineAggregation(new PipelineAggregationSpec(SerialDiffPipelineAggregationBuilder.NAME, SerialDiffPipelineAggregationBuilder::new, SerialDiffPipelineAggregator::new, SerialDiffPipelineAggregationBuilder::parse));
    registerPipelineAggregation(new PipelineAggregationSpec(MovFnPipelineAggregationBuilder.NAME, MovFnPipelineAggregationBuilder::new, MovFnPipelineAggregator::new, MovFnPipelineAggregationBuilder.PARSER));
    registerFromPlugin(plugins, SearchPlugin::getPipelineAggregations, this::registerPipelineAggregation);
}
Also used : MaxBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.MaxBucketPipelineAggregationBuilder) ExtendedStatsBucketPipelineAggregator(org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregator) PercentilesBucketPipelineAggregator(org.opensearch.search.aggregations.pipeline.PercentilesBucketPipelineAggregator) StatsBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.StatsBucketPipelineAggregationBuilder) ExtendedStatsBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregationBuilder) PercentilesBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.PercentilesBucketPipelineAggregationBuilder) SearchPlugin(org.opensearch.plugins.SearchPlugin) PipelineAggregationSpec(org.opensearch.plugins.SearchPlugin.PipelineAggregationSpec) DerivativePipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.DerivativePipelineAggregationBuilder) ExtendedStatsBucketParser(org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketParser) DerivativePipelineAggregator(org.opensearch.search.aggregations.pipeline.DerivativePipelineAggregator) ExtendedStatsBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregationBuilder) AvgBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.AvgBucketPipelineAggregationBuilder) MaxBucketPipelineAggregator(org.opensearch.search.aggregations.pipeline.MaxBucketPipelineAggregator) AvgBucketPipelineAggregator(org.opensearch.search.aggregations.pipeline.AvgBucketPipelineAggregator) XContentParser(org.opensearch.common.xcontent.XContentParser) ExtendedStatsBucketPipelineAggregator(org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregator) StatsBucketPipelineAggregator(org.opensearch.search.aggregations.pipeline.StatsBucketPipelineAggregator)

Aggregations

XContentParser (org.opensearch.common.xcontent.XContentParser)1 SearchPlugin (org.opensearch.plugins.SearchPlugin)1 PipelineAggregationSpec (org.opensearch.plugins.SearchPlugin.PipelineAggregationSpec)1 AvgBucketPipelineAggregationBuilder (org.opensearch.search.aggregations.pipeline.AvgBucketPipelineAggregationBuilder)1 AvgBucketPipelineAggregator (org.opensearch.search.aggregations.pipeline.AvgBucketPipelineAggregator)1 DerivativePipelineAggregationBuilder (org.opensearch.search.aggregations.pipeline.DerivativePipelineAggregationBuilder)1 DerivativePipelineAggregator (org.opensearch.search.aggregations.pipeline.DerivativePipelineAggregator)1 ExtendedStatsBucketParser (org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketParser)1 ExtendedStatsBucketPipelineAggregationBuilder (org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregationBuilder)1 ExtendedStatsBucketPipelineAggregator (org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregator)1 MaxBucketPipelineAggregationBuilder (org.opensearch.search.aggregations.pipeline.MaxBucketPipelineAggregationBuilder)1 MaxBucketPipelineAggregator (org.opensearch.search.aggregations.pipeline.MaxBucketPipelineAggregator)1 PercentilesBucketPipelineAggregationBuilder (org.opensearch.search.aggregations.pipeline.PercentilesBucketPipelineAggregationBuilder)1 PercentilesBucketPipelineAggregator (org.opensearch.search.aggregations.pipeline.PercentilesBucketPipelineAggregator)1 StatsBucketPipelineAggregationBuilder (org.opensearch.search.aggregations.pipeline.StatsBucketPipelineAggregationBuilder)1 StatsBucketPipelineAggregator (org.opensearch.search.aggregations.pipeline.StatsBucketPipelineAggregator)1