Search in sources :

Example 21 with InternalAggregation

use of org.elasticsearch.search.aggregations.InternalAggregation in project elasticsearch by elastic.

the class InternalGeoBounds method doReduce.

@Override
public InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
    double top = Double.NEGATIVE_INFINITY;
    double bottom = Double.POSITIVE_INFINITY;
    double posLeft = Double.POSITIVE_INFINITY;
    double posRight = Double.NEGATIVE_INFINITY;
    double negLeft = Double.POSITIVE_INFINITY;
    double negRight = Double.NEGATIVE_INFINITY;
    for (InternalAggregation aggregation : aggregations) {
        InternalGeoBounds bounds = (InternalGeoBounds) aggregation;
        if (bounds.top > top) {
            top = bounds.top;
        }
        if (bounds.bottom < bottom) {
            bottom = bounds.bottom;
        }
        if (bounds.posLeft < posLeft) {
            posLeft = bounds.posLeft;
        }
        if (bounds.posRight > posRight) {
            posRight = bounds.posRight;
        }
        if (bounds.negLeft < negLeft) {
            negLeft = bounds.negLeft;
        }
        if (bounds.negRight > negRight) {
            negRight = bounds.negRight;
        }
    }
    return new InternalGeoBounds(name, top, bottom, posLeft, posRight, negLeft, negRight, wrapLongitude, pipelineAggregators(), getMetaData());
}
Also used : InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation)

Example 22 with InternalAggregation

use of org.elasticsearch.search.aggregations.InternalAggregation in project elasticsearch by elastic.

the class AbstractInternalHDRPercentiles method doReduce.

@Override
public AbstractInternalHDRPercentiles doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
    DoubleHistogram merged = null;
    for (InternalAggregation aggregation : aggregations) {
        final AbstractInternalHDRPercentiles percentiles = (AbstractInternalHDRPercentiles) aggregation;
        if (merged == null) {
            merged = new DoubleHistogram(percentiles.state);
            merged.setAutoResize(true);
        }
        merged.add(percentiles.state);
    }
    return createReduced(getName(), keys, merged, keyed, pipelineAggregators(), getMetaData());
}
Also used : InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation) DoubleHistogram(org.HdrHistogram.DoubleHistogram)

Example 23 with InternalAggregation

use of org.elasticsearch.search.aggregations.InternalAggregation in project elasticsearch by elastic.

the class AbstractInternalTDigestPercentiles method doReduce.

@Override
public AbstractInternalTDigestPercentiles doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
    TDigestState merged = null;
    for (InternalAggregation aggregation : aggregations) {
        final AbstractInternalTDigestPercentiles percentiles = (AbstractInternalTDigestPercentiles) aggregation;
        if (merged == null) {
            merged = new TDigestState(percentiles.state.compression());
        }
        merged.add(percentiles.state);
    }
    return createReduced(getName(), keys, merged, keyed, pipelineAggregators(), getMetaData());
}
Also used : InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation)

Example 24 with InternalAggregation

use of org.elasticsearch.search.aggregations.InternalAggregation in project elasticsearch by elastic.

the class ProfilingAggregator method buildAggregation.

@Override
public InternalAggregation buildAggregation(long bucket) throws IOException {
    profileBreakdown.startTime(AggregationTimingType.BUILD_AGGREGATION);
    InternalAggregation result = delegate.buildAggregation(bucket);
    profileBreakdown.stopAndRecordTime();
    return result;
}
Also used : InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation)

Example 25 with InternalAggregation

use of org.elasticsearch.search.aggregations.InternalAggregation in project elasticsearch by elastic.

the class SearchModule method registerPipelineAggregation.

private void registerPipelineAggregation(PipelineAggregationSpec spec) {
    if (false == transportClient) {
        namedXContents.add(new NamedXContentRegistry.Entry(BaseAggregationBuilder.class, spec.getName(), (p, c) -> {
            AggregatorFactories.AggParseContext context = (AggregatorFactories.AggParseContext) c;
            return spec.getParser().parse(context.name, context.queryParseContext);
        }));
    }
    namedWriteables.add(new NamedWriteableRegistry.Entry(PipelineAggregationBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
    namedWriteables.add(new NamedWriteableRegistry.Entry(PipelineAggregator.class, spec.getName().getPreferredName(), spec.getAggregatorReader()));
    for (Map.Entry<String, Writeable.Reader<? extends InternalAggregation>> resultReader : spec.getResultReaders().entrySet()) {
        namedWriteables.add(new NamedWriteableRegistry.Entry(InternalAggregation.class, resultReader.getKey(), resultReader.getValue()));
    }
}
Also used : InternalReverseNested(org.elasticsearch.search.aggregations.bucket.nested.InternalReverseNested) IdsQueryBuilder(org.elasticsearch.index.query.IdsQueryBuilder) NestedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder) DerivativePipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.derivative.DerivativePipelineAggregationBuilder) SumBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.sum.SumBucketPipelineAggregationBuilder) UnmappedSampler(org.elasticsearch.search.aggregations.bucket.sampler.UnmappedSampler) RangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder) SumAggregationBuilder(org.elasticsearch.search.aggregations.metrics.sum.SumAggregationBuilder) HasParentQueryBuilder(org.elasticsearch.index.query.HasParentQueryBuilder) LongTerms(org.elasticsearch.search.aggregations.bucket.terms.LongTerms) InternalGeoBounds(org.elasticsearch.search.aggregations.metrics.geobounds.InternalGeoBounds) FieldValueFactorFunctionBuilder(org.elasticsearch.index.query.functionscore.FieldValueFactorFunctionBuilder) Map(java.util.Map) SuggesterSpec(org.elasticsearch.plugins.SearchPlugin.SuggesterSpec) ExtendedStatsBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketPipelineAggregationBuilder) InternalExtendedStatsBucket(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.InternalExtendedStatsBucket) SignificanceHeuristicParser(org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristicParser) MutualInformation(org.elasticsearch.search.aggregations.bucket.significant.heuristics.MutualInformation) InternalDerivative(org.elasticsearch.search.aggregations.pipeline.derivative.InternalDerivative) InternalGeoDistance(org.elasticsearch.search.aggregations.bucket.range.geodistance.InternalGeoDistance) NamedRegistry(org.elasticsearch.common.NamedRegistry) ScriptScoreFunctionBuilder(org.elasticsearch.index.query.functionscore.ScriptScoreFunctionBuilder) InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation) MaxAggregationBuilder(org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder) RandomScoreFunctionBuilder(org.elasticsearch.index.query.functionscore.RandomScoreFunctionBuilder) FastVectorHighlighter(org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter) GeoDistanceQueryBuilder(org.elasticsearch.index.query.GeoDistanceQueryBuilder) QueryRescorerBuilder(org.elasticsearch.search.rescore.QueryRescorerBuilder) TermSuggestionBuilder(org.elasticsearch.search.suggest.term.TermSuggestionBuilder) SearchPlugin(org.elasticsearch.plugins.SearchPlugin) MatchQueryBuilder(org.elasticsearch.index.query.MatchQueryBuilder) CumulativeSumPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.cumulativesum.CumulativeSumPipelineAggregationBuilder) SearchRequest(org.elasticsearch.action.search.SearchRequest) InternalFilter(org.elasticsearch.search.aggregations.bucket.filter.InternalFilter) SamplerAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder) MinBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.min.MinBucketPipelineAggregator) NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) FunctionScoreQueryBuilder(org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder) AggregatorFactories(org.elasticsearch.search.aggregations.AggregatorFactories) FetchPhaseConstructionContext(org.elasticsearch.plugins.SearchPlugin.FetchPhaseConstructionContext) SignificantTermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder) MaxBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.max.MaxBucketPipelineAggregator) QueryBuilder(org.elasticsearch.index.query.QueryBuilder) GeoBoundingBoxQueryBuilder(org.elasticsearch.index.query.GeoBoundingBoxQueryBuilder) VersionFetchSubPhase(org.elasticsearch.search.fetch.subphase.VersionFetchSubPhase) WildcardQueryBuilder(org.elasticsearch.index.query.WildcardQueryBuilder) XContentParser(org.elasticsearch.common.xcontent.XContentParser) DateHistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder) InternalTopHits(org.elasticsearch.search.aggregations.metrics.tophits.InternalTopHits) InternalCardinality(org.elasticsearch.search.aggregations.metrics.cardinality.InternalCardinality) GND(org.elasticsearch.search.aggregations.bucket.significant.heuristics.GND) WeightBuilder(org.elasticsearch.index.query.functionscore.WeightBuilder) InternalMax(org.elasticsearch.search.aggregations.metrics.max.InternalMax) GeoDistanceSortBuilder(org.elasticsearch.search.sort.GeoDistanceSortBuilder) MinBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.min.MinBucketPipelineAggregationBuilder) Settings(org.elasticsearch.common.settings.Settings) ParentIdQueryBuilder(org.elasticsearch.index.query.ParentIdQueryBuilder) LinearModel(org.elasticsearch.search.aggregations.pipeline.movavg.models.LinearModel) FieldMaskingSpanQueryBuilder(org.elasticsearch.index.query.FieldMaskingSpanQueryBuilder) CompletionSuggestionBuilder(org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder) BucketScriptPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketscript.BucketScriptPipelineAggregator) GeoBoundsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.geobounds.GeoBoundsAggregationBuilder) ExponentialDecayFunctionBuilder(org.elasticsearch.index.query.functionscore.ExponentialDecayFunctionBuilder) BucketSelectorPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketselector.BucketSelectorPipelineAggregator) InternalPercentilesBucket(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.InternalPercentilesBucket) LinearDecayFunctionBuilder(org.elasticsearch.index.query.functionscore.LinearDecayFunctionBuilder) InternalHDRPercentileRanks(org.elasticsearch.search.aggregations.metrics.percentiles.hdr.InternalHDRPercentileRanks) GeoShapeQueryBuilder(org.elasticsearch.index.query.GeoShapeQueryBuilder) FilterAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder) AvgBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.avg.AvgBucketPipelineAggregationBuilder) QueryParseContext(org.elasticsearch.index.query.QueryParseContext) ShapeBuilders(org.elasticsearch.common.geo.builders.ShapeBuilders) ReverseNestedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) ScriptQueryBuilder(org.elasticsearch.index.query.ScriptQueryBuilder) TopHitsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder) ExplainFetchSubPhase(org.elasticsearch.search.fetch.subphase.ExplainFetchSubPhase) BaseAggregationBuilder(org.elasticsearch.search.aggregations.BaseAggregationBuilder) PercentilesBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.PercentilesBucketPipelineAggregationBuilder) DocValueFieldsFetchSubPhase(org.elasticsearch.search.fetch.subphase.DocValueFieldsFetchSubPhase) FetchPhase(org.elasticsearch.search.fetch.FetchPhase) MovAvgPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.movavg.MovAvgPipelineAggregator) Laplace(org.elasticsearch.search.suggest.phrase.Laplace) InternalDateRange(org.elasticsearch.search.aggregations.bucket.range.date.InternalDateRange) SimpleModel(org.elasticsearch.search.aggregations.pipeline.movavg.models.SimpleModel) QuerySpec(org.elasticsearch.plugins.SearchPlugin.QuerySpec) HighlightPhase(org.elasticsearch.search.fetch.subphase.highlight.HighlightPhase) Function(java.util.function.Function) PercentilesBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.PercentilesBucketPipelineAggregator) UnifiedHighlighter(org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter) InternalRange(org.elasticsearch.search.aggregations.bucket.range.InternalRange) StringTerms(org.elasticsearch.search.aggregations.bucket.terms.StringTerms) SpanOrQueryBuilder(org.elasticsearch.index.query.SpanOrQueryBuilder) MoreLikeThisQueryBuilder(org.elasticsearch.index.query.MoreLikeThisQueryBuilder) StatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.StatsAggregationBuilder) FiltersAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filters.FiltersAggregationBuilder) PipelineAggregator(org.elasticsearch.search.aggregations.pipeline.PipelineAggregator) InternalExtendedStats(org.elasticsearch.search.aggregations.metrics.stats.extended.InternalExtendedStats) InternalAvg(org.elasticsearch.search.aggregations.metrics.avg.InternalAvg) SearchExtensionSpec(org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec) PipelineAggregationSpec(org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec) HistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder) FetchSourceSubPhase(org.elasticsearch.search.fetch.subphase.FetchSourceSubPhase) DisMaxQueryBuilder(org.elasticsearch.index.query.DisMaxQueryBuilder) Consumer(java.util.function.Consumer) SearchExtSpec(org.elasticsearch.plugins.SearchPlugin.SearchExtSpec) HasChildQueryBuilder(org.elasticsearch.index.query.HasChildQueryBuilder) BucketSelectorPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketselector.BucketSelectorPipelineAggregationBuilder) DoubleTerms(org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms) Entry(org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry) ScoreFunctionSpec(org.elasticsearch.plugins.SearchPlugin.ScoreFunctionSpec) JLHScore(org.elasticsearch.search.aggregations.bucket.significant.heuristics.JLHScore) GaussDecayFunctionBuilder(org.elasticsearch.index.query.functionscore.GaussDecayFunctionBuilder) IpRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder) TermsQueryBuilder(org.elasticsearch.index.query.TermsQueryBuilder) PlainHighlighter(org.elasticsearch.search.fetch.subphase.highlight.PlainHighlighter) InternalNested(org.elasticsearch.search.aggregations.bucket.nested.InternalNested) MovAvgModel(org.elasticsearch.search.aggregations.pipeline.movavg.models.MovAvgModel) ChildrenAggregationBuilder(org.elasticsearch.search.aggregations.bucket.children.ChildrenAggregationBuilder) EwmaModel(org.elasticsearch.search.aggregations.pipeline.movavg.models.EwmaModel) InternalStatsBucket(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.InternalStatsBucket) CardinalityAggregationBuilder(org.elasticsearch.search.aggregations.metrics.cardinality.CardinalityAggregationBuilder) SuggestionBuilder(org.elasticsearch.search.suggest.SuggestionBuilder) InternalValueCount(org.elasticsearch.search.aggregations.metrics.valuecount.InternalValueCount) InternalSum(org.elasticsearch.search.aggregations.metrics.sum.InternalSum) SpanFirstQueryBuilder(org.elasticsearch.index.query.SpanFirstQueryBuilder) SpanTermQueryBuilder(org.elasticsearch.index.query.SpanTermQueryBuilder) SumBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.sum.SumBucketPipelineAggregator) GeoGridAggregationBuilder(org.elasticsearch.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder) CumulativeSumPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.cumulativesum.CumulativeSumPipelineAggregator) StupidBackoff(org.elasticsearch.search.suggest.phrase.StupidBackoff) InternalGlobal(org.elasticsearch.search.aggregations.bucket.global.InternalGlobal) RangeQueryBuilder(org.elasticsearch.index.query.RangeQueryBuilder) TypeQueryBuilder(org.elasticsearch.index.query.TypeQueryBuilder) LinearInterpolation(org.elasticsearch.search.suggest.phrase.LinearInterpolation) FieldSortBuilder(org.elasticsearch.search.sort.FieldSortBuilder) SpanContainingQueryBuilder(org.elasticsearch.index.query.SpanContainingQueryBuilder) ParseFieldRegistry(org.elasticsearch.common.xcontent.ParseFieldRegistry) DiversifiedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.DiversifiedAggregationBuilder) ExistsQueryBuilder(org.elasticsearch.index.query.ExistsQueryBuilder) NestedQueryBuilder(org.elasticsearch.index.query.NestedQueryBuilder) InternalGeoCentroid(org.elasticsearch.search.aggregations.metrics.geocentroid.InternalGeoCentroid) StatsBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregator) WrapperQueryBuilder(org.elasticsearch.index.query.WrapperQueryBuilder) HoltLinearModel(org.elasticsearch.search.aggregations.pipeline.movavg.models.HoltLinearModel) GeoCentroidAggregationBuilder(org.elasticsearch.search.aggregations.metrics.geocentroid.GeoCentroidAggregationBuilder) InternalSimpleValue(org.elasticsearch.search.aggregations.pipeline.InternalSimpleValue) MatchPhraseQueryBuilder(org.elasticsearch.index.query.MatchPhraseQueryBuilder) InternalSampler(org.elasticsearch.search.aggregations.bucket.sampler.InternalSampler) MultiMatchQueryBuilder(org.elasticsearch.index.query.MultiMatchQueryBuilder) MatchAllQueryBuilder(org.elasticsearch.index.query.MatchAllQueryBuilder) InternalAdjacencyMatrix(org.elasticsearch.search.aggregations.bucket.adjacency.InternalAdjacencyMatrix) StatsBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregationBuilder) SimpleQueryStringBuilder(org.elasticsearch.index.query.SimpleQueryStringBuilder) ConstantScoreQueryBuilder(org.elasticsearch.index.query.ConstantScoreQueryBuilder) AvgBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.avg.AvgBucketPipelineAggregator) SerialDiffPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.serialdiff.SerialDiffPipelineAggregationBuilder) RegexpQueryBuilder(org.elasticsearch.index.query.RegexpQueryBuilder) PercentageScore(org.elasticsearch.search.aggregations.bucket.significant.heuristics.PercentageScore) InternalStats(org.elasticsearch.search.aggregations.metrics.stats.InternalStats) SpanNearQueryBuilder(org.elasticsearch.index.query.SpanNearQueryBuilder) ArrayList(java.util.ArrayList) InternalChildren(org.elasticsearch.search.aggregations.bucket.children.InternalChildren) BiConsumer(java.util.function.BiConsumer) ExtendedStatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder) MaxBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.max.MaxBucketPipelineAggregationBuilder) SortBuilder(org.elasticsearch.search.sort.SortBuilder) SignificanceHeuristic(org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic) TermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder) InternalHDRPercentiles(org.elasticsearch.search.aggregations.metrics.percentiles.hdr.InternalHDRPercentiles) ParentFieldSubFetchPhase(org.elasticsearch.search.fetch.subphase.ParentFieldSubFetchPhase) MatchNoneQueryBuilder(org.elasticsearch.index.query.MatchNoneQueryBuilder) GlobalAggregationBuilder(org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder) InternalDateHistogram(org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram) SpanMultiTermQueryBuilder(org.elasticsearch.index.query.SpanMultiTermQueryBuilder) ShapesAvailability(org.elasticsearch.common.geo.ShapesAvailability) GeoPolygonQueryBuilder(org.elasticsearch.index.query.GeoPolygonQueryBuilder) Highlighter(org.elasticsearch.search.fetch.subphase.highlight.Highlighter) PostingsHighlighter(org.elasticsearch.search.fetch.subphase.highlight.PostingsHighlighter) SmoothingModel(org.elasticsearch.search.suggest.phrase.SmoothingModel) BoostingQueryBuilder(org.elasticsearch.index.query.BoostingQueryBuilder) InternalScriptedMetric(org.elasticsearch.search.aggregations.metrics.scripted.InternalScriptedMetric) GeoDistanceAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.geodistance.GeoDistanceAggregationBuilder) ExtendedStatsBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketPipelineAggregator) BucketScriptPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketscript.BucketScriptPipelineAggregationBuilder) InternalHistogram(org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram) ScriptSortBuilder(org.elasticsearch.search.sort.ScriptSortBuilder) PipelineAggregationBuilder(org.elasticsearch.search.aggregations.PipelineAggregationBuilder) PrefixQueryBuilder(org.elasticsearch.index.query.PrefixQueryBuilder) RescoreBuilder(org.elasticsearch.search.rescore.RescoreBuilder) InternalMin(org.elasticsearch.search.aggregations.metrics.min.InternalMin) MatchPhrasePrefixQueryBuilder(org.elasticsearch.index.query.MatchPhrasePrefixQueryBuilder) SignificantStringTerms(org.elasticsearch.search.aggregations.bucket.significant.SignificantStringTerms) PercentileRanksAggregationBuilder(org.elasticsearch.search.aggregations.metrics.percentiles.PercentileRanksAggregationBuilder) ScriptFieldsFetchSubPhase(org.elasticsearch.search.fetch.subphase.ScriptFieldsFetchSubPhase) SearchResponse(org.elasticsearch.action.search.SearchResponse) MinAggregationBuilder(org.elasticsearch.search.aggregations.metrics.min.MinAggregationBuilder) SpanWithinQueryBuilder(org.elasticsearch.index.query.SpanWithinQueryBuilder) NamedXContentRegistry(org.elasticsearch.common.xcontent.NamedXContentRegistry) MissingAggregationBuilder(org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder) Setting(org.elasticsearch.common.settings.Setting) MatchedQueriesFetchSubPhase(org.elasticsearch.search.fetch.subphase.MatchedQueriesFetchSubPhase) InternalTDigestPercentileRanks(org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.InternalTDigestPercentileRanks) InternalBucketMetricValue(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.InternalBucketMetricValue) HoltWintersModel(org.elasticsearch.search.aggregations.pipeline.movavg.models.HoltWintersModel) ScoreSortBuilder(org.elasticsearch.search.sort.ScoreSortBuilder) ScriptedMetricAggregationBuilder(org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregationBuilder) SerialDiffPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.serialdiff.SerialDiffPipelineAggregator) List(java.util.List) UnmappedSignificantTerms(org.elasticsearch.search.aggregations.bucket.significant.UnmappedSignificantTerms) ChiSquare(org.elasticsearch.search.aggregations.bucket.significant.heuristics.ChiSquare) ValueCountAggregationBuilder(org.elasticsearch.search.aggregations.metrics.valuecount.ValueCountAggregationBuilder) ScoreFunctionBuilder(org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder) BoolQueryBuilder(org.elasticsearch.index.query.BoolQueryBuilder) InternalGeoHashGrid(org.elasticsearch.search.aggregations.bucket.geogrid.InternalGeoHashGrid) UnmappedTerms(org.elasticsearch.search.aggregations.bucket.terms.UnmappedTerms) AggregationBuilder(org.elasticsearch.search.aggregations.AggregationBuilder) QueryStringQueryBuilder(org.elasticsearch.index.query.QueryStringQueryBuilder) ExtendedStatsBucketParser(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketParser) SpanNotQueryBuilder(org.elasticsearch.index.query.SpanNotQueryBuilder) DateRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder) DerivativePipelineAggregator(org.elasticsearch.search.aggregations.pipeline.derivative.DerivativePipelineAggregator) FetchSubPhase(org.elasticsearch.search.fetch.FetchSubPhase) PercentilesAggregationBuilder(org.elasticsearch.search.aggregations.metrics.percentiles.PercentilesAggregationBuilder) CommonTermsQueryBuilder(org.elasticsearch.index.query.CommonTermsQueryBuilder) Objects.requireNonNull(java.util.Objects.requireNonNull) AdjacencyMatrixAggregationBuilder(org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder) InternalMissing(org.elasticsearch.search.aggregations.bucket.missing.InternalMissing) InternalBinaryRange(org.elasticsearch.search.aggregations.bucket.range.InternalBinaryRange) MovAvgPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.movavg.MovAvgPipelineAggregationBuilder) SignificantLongTerms(org.elasticsearch.search.aggregations.bucket.significant.SignificantLongTerms) TermQueryBuilder(org.elasticsearch.index.query.TermQueryBuilder) AvgAggregationBuilder(org.elasticsearch.search.aggregations.metrics.avg.AvgAggregationBuilder) PhraseSuggestionBuilder(org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder) AggregationSpec(org.elasticsearch.plugins.SearchPlugin.AggregationSpec) BooleanQuery(org.apache.lucene.search.BooleanQuery) InternalFilters(org.elasticsearch.search.aggregations.bucket.filters.InternalFilters) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) InternalTDigestPercentiles(org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.InternalTDigestPercentiles) Writeable(org.elasticsearch.common.io.stream.Writeable) ScriptHeuristic(org.elasticsearch.search.aggregations.bucket.significant.heuristics.ScriptHeuristic) FuzzyQueryBuilder(org.elasticsearch.index.query.FuzzyQueryBuilder) NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) DerivativePipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.derivative.DerivativePipelineAggregationBuilder) SumBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.sum.SumBucketPipelineAggregationBuilder) ExtendedStatsBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketPipelineAggregationBuilder) CumulativeSumPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.cumulativesum.CumulativeSumPipelineAggregationBuilder) MinBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.min.MinBucketPipelineAggregationBuilder) AvgBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.avg.AvgBucketPipelineAggregationBuilder) PercentilesBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.PercentilesBucketPipelineAggregationBuilder) BucketSelectorPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketselector.BucketSelectorPipelineAggregationBuilder) StatsBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregationBuilder) SerialDiffPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.serialdiff.SerialDiffPipelineAggregationBuilder) MaxBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.max.MaxBucketPipelineAggregationBuilder) BucketScriptPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketscript.BucketScriptPipelineAggregationBuilder) PipelineAggregationBuilder(org.elasticsearch.search.aggregations.PipelineAggregationBuilder) MovAvgPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.movavg.MovAvgPipelineAggregationBuilder) MinBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.min.MinBucketPipelineAggregator) MaxBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.max.MaxBucketPipelineAggregator) BucketScriptPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketscript.BucketScriptPipelineAggregator) BucketSelectorPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketselector.BucketSelectorPipelineAggregator) MovAvgPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.movavg.MovAvgPipelineAggregator) PercentilesBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.PercentilesBucketPipelineAggregator) PipelineAggregator(org.elasticsearch.search.aggregations.pipeline.PipelineAggregator) SumBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.sum.SumBucketPipelineAggregator) CumulativeSumPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.cumulativesum.CumulativeSumPipelineAggregator) StatsBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregator) AvgBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.avg.AvgBucketPipelineAggregator) ExtendedStatsBucketPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketPipelineAggregator) SerialDiffPipelineAggregator(org.elasticsearch.search.aggregations.pipeline.serialdiff.SerialDiffPipelineAggregator) DerivativePipelineAggregator(org.elasticsearch.search.aggregations.pipeline.derivative.DerivativePipelineAggregator) Entry(org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry) InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation) AggregatorFactories(org.elasticsearch.search.aggregations.AggregatorFactories) NamedXContentRegistry(org.elasticsearch.common.xcontent.NamedXContentRegistry) Map(java.util.Map) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) BaseAggregationBuilder(org.elasticsearch.search.aggregations.BaseAggregationBuilder)

Aggregations

InternalAggregation (org.elasticsearch.search.aggregations.InternalAggregation)33 ArrayList (java.util.ArrayList)23 List (java.util.List)16 Map (java.util.Map)10 InternalAggregations (org.elasticsearch.search.aggregations.InternalAggregations)10 IOException (java.io.IOException)8 Collectors (java.util.stream.Collectors)8 PipelineAggregator (org.elasticsearch.search.aggregations.pipeline.PipelineAggregator)8 StreamSupport (java.util.stream.StreamSupport)7 StreamInput (org.elasticsearch.common.io.stream.StreamInput)7 ReduceContext (org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext)7 Bucket (org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket)7 InternalSimpleValue (org.elasticsearch.search.aggregations.pipeline.InternalSimpleValue)6 HashMap (java.util.HashMap)5 DocValueFormat (org.elasticsearch.search.DocValueFormat)5 StreamOutput (org.elasticsearch.common.io.stream.StreamOutput)4 Settings (org.elasticsearch.common.settings.Settings)4 SignificanceHeuristic (org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic)4 GapPolicy (org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy)4 BucketHelpers.resolveBucketValue (org.elasticsearch.search.aggregations.pipeline.BucketHelpers.resolveBucketValue)4