Search in sources :

Example 1 with AggregationSpec

use of org.elasticsearch.plugins.SearchPlugin.AggregationSpec in project elasticsearch by elastic.

the class SearchModule method registerAggregation.

private void registerAggregation(AggregationSpec 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(AggregationBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
    for (Map.Entry<String, Writeable.Reader<? extends InternalAggregation>> t : spec.getResultReaders().entrySet()) {
        String writeableName = t.getKey();
        Writeable.Reader<? extends InternalAggregation> internalReader = t.getValue();
        namedWriteables.add(new NamedWriteableRegistry.Entry(InternalAggregation.class, writeableName, internalReader));
    }
}
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) 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) RangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder) SumAggregationBuilder(org.elasticsearch.search.aggregations.metrics.sum.SumAggregationBuilder) ExtendedStatsBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketPipelineAggregationBuilder) MaxAggregationBuilder(org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder) CumulativeSumPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.cumulativesum.CumulativeSumPipelineAggregationBuilder) SamplerAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder) SignificantTermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder) DateHistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder) MinBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.min.MinBucketPipelineAggregationBuilder) GeoBoundsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.geobounds.GeoBoundsAggregationBuilder) FilterAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder) AvgBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.avg.AvgBucketPipelineAggregationBuilder) ReverseNestedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) TopHitsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder) BaseAggregationBuilder(org.elasticsearch.search.aggregations.BaseAggregationBuilder) PercentilesBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.PercentilesBucketPipelineAggregationBuilder) StatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.StatsAggregationBuilder) FiltersAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filters.FiltersAggregationBuilder) HistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder) BucketSelectorPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketselector.BucketSelectorPipelineAggregationBuilder) IpRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder) ChildrenAggregationBuilder(org.elasticsearch.search.aggregations.bucket.children.ChildrenAggregationBuilder) CardinalityAggregationBuilder(org.elasticsearch.search.aggregations.metrics.cardinality.CardinalityAggregationBuilder) GeoGridAggregationBuilder(org.elasticsearch.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder) DiversifiedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.DiversifiedAggregationBuilder) GeoCentroidAggregationBuilder(org.elasticsearch.search.aggregations.metrics.geocentroid.GeoCentroidAggregationBuilder) StatsBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregationBuilder) SerialDiffPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.serialdiff.SerialDiffPipelineAggregationBuilder) ExtendedStatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder) MaxBucketPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketmetrics.max.MaxBucketPipelineAggregationBuilder) TermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder) GlobalAggregationBuilder(org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder) GeoDistanceAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.geodistance.GeoDistanceAggregationBuilder) BucketScriptPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.bucketscript.BucketScriptPipelineAggregationBuilder) PipelineAggregationBuilder(org.elasticsearch.search.aggregations.PipelineAggregationBuilder) PercentileRanksAggregationBuilder(org.elasticsearch.search.aggregations.metrics.percentiles.PercentileRanksAggregationBuilder) MinAggregationBuilder(org.elasticsearch.search.aggregations.metrics.min.MinAggregationBuilder) MissingAggregationBuilder(org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder) ScriptedMetricAggregationBuilder(org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregationBuilder) ValueCountAggregationBuilder(org.elasticsearch.search.aggregations.metrics.valuecount.ValueCountAggregationBuilder) AggregationBuilder(org.elasticsearch.search.aggregations.AggregationBuilder) DateRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder) PercentilesAggregationBuilder(org.elasticsearch.search.aggregations.metrics.percentiles.PercentilesAggregationBuilder) AdjacencyMatrixAggregationBuilder(org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder) MovAvgPipelineAggregationBuilder(org.elasticsearch.search.aggregations.pipeline.movavg.MovAvgPipelineAggregationBuilder) AvgAggregationBuilder(org.elasticsearch.search.aggregations.metrics.avg.AvgAggregationBuilder) Entry(org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry) InternalAggregation(org.elasticsearch.search.aggregations.InternalAggregation) AggregatorFactories(org.elasticsearch.search.aggregations.AggregatorFactories) Writeable(org.elasticsearch.common.io.stream.Writeable) NamedXContentRegistry(org.elasticsearch.common.xcontent.NamedXContentRegistry) Map(java.util.Map) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) BaseAggregationBuilder(org.elasticsearch.search.aggregations.BaseAggregationBuilder)

Example 2 with AggregationSpec

use of org.elasticsearch.plugins.SearchPlugin.AggregationSpec in project elasticsearch by elastic.

the class SearchModule method registerAggregations.

private void registerAggregations(List<SearchPlugin> plugins) {
    registerAggregation(new AggregationSpec(AvgAggregationBuilder.NAME, AvgAggregationBuilder::new, AvgAggregationBuilder::parse).addResultReader(InternalAvg::new));
    registerAggregation(new AggregationSpec(SumAggregationBuilder.NAME, SumAggregationBuilder::new, SumAggregationBuilder::parse).addResultReader(InternalSum::new));
    registerAggregation(new AggregationSpec(MinAggregationBuilder.NAME, MinAggregationBuilder::new, MinAggregationBuilder::parse).addResultReader(InternalMin::new));
    registerAggregation(new AggregationSpec(MaxAggregationBuilder.NAME, MaxAggregationBuilder::new, MaxAggregationBuilder::parse).addResultReader(InternalMax::new));
    registerAggregation(new AggregationSpec(StatsAggregationBuilder.NAME, StatsAggregationBuilder::new, StatsAggregationBuilder::parse).addResultReader(InternalStats::new));
    registerAggregation(new AggregationSpec(ExtendedStatsAggregationBuilder.NAME, ExtendedStatsAggregationBuilder::new, ExtendedStatsAggregationBuilder::parse).addResultReader(InternalExtendedStats::new));
    registerAggregation(new AggregationSpec(ValueCountAggregationBuilder.NAME, ValueCountAggregationBuilder::new, ValueCountAggregationBuilder::parse).addResultReader(InternalValueCount::new));
    registerAggregation(new AggregationSpec(PercentilesAggregationBuilder.NAME, PercentilesAggregationBuilder::new, PercentilesAggregationBuilder::parse).addResultReader(InternalTDigestPercentiles.NAME, InternalTDigestPercentiles::new).addResultReader(InternalHDRPercentiles.NAME, InternalHDRPercentiles::new));
    registerAggregation(new AggregationSpec(PercentileRanksAggregationBuilder.NAME, PercentileRanksAggregationBuilder::new, PercentileRanksAggregationBuilder::parse).addResultReader(InternalTDigestPercentileRanks.NAME, InternalTDigestPercentileRanks::new).addResultReader(InternalHDRPercentileRanks.NAME, InternalHDRPercentileRanks::new));
    registerAggregation(new AggregationSpec(CardinalityAggregationBuilder.NAME, CardinalityAggregationBuilder::new, CardinalityAggregationBuilder::parse).addResultReader(InternalCardinality::new));
    registerAggregation(new AggregationSpec(GlobalAggregationBuilder.NAME, GlobalAggregationBuilder::new, GlobalAggregationBuilder::parse).addResultReader(InternalGlobal::new));
    registerAggregation(new AggregationSpec(MissingAggregationBuilder.NAME, MissingAggregationBuilder::new, MissingAggregationBuilder::parse).addResultReader(InternalMissing::new));
    registerAggregation(new AggregationSpec(FilterAggregationBuilder.NAME, FilterAggregationBuilder::new, FilterAggregationBuilder::parse).addResultReader(InternalFilter::new));
    registerAggregation(new AggregationSpec(FiltersAggregationBuilder.NAME, FiltersAggregationBuilder::new, FiltersAggregationBuilder::parse).addResultReader(InternalFilters::new));
    registerAggregation(new AggregationSpec(AdjacencyMatrixAggregationBuilder.NAME, AdjacencyMatrixAggregationBuilder::new, AdjacencyMatrixAggregationBuilder.getParser()).addResultReader(InternalAdjacencyMatrix::new));
    registerAggregation(new AggregationSpec(SamplerAggregationBuilder.NAME, SamplerAggregationBuilder::new, SamplerAggregationBuilder::parse).addResultReader(InternalSampler.NAME, InternalSampler::new).addResultReader(UnmappedSampler.NAME, UnmappedSampler::new));
    registerAggregation(new AggregationSpec(DiversifiedAggregationBuilder.NAME, DiversifiedAggregationBuilder::new, DiversifiedAggregationBuilder::parse));
    registerAggregation(new AggregationSpec(TermsAggregationBuilder.NAME, TermsAggregationBuilder::new, TermsAggregationBuilder::parse).addResultReader(StringTerms.NAME, StringTerms::new).addResultReader(UnmappedTerms.NAME, UnmappedTerms::new).addResultReader(LongTerms.NAME, LongTerms::new).addResultReader(DoubleTerms.NAME, DoubleTerms::new));
    registerAggregation(new AggregationSpec(SignificantTermsAggregationBuilder.NAME, SignificantTermsAggregationBuilder::new, SignificantTermsAggregationBuilder.getParser(significanceHeuristicParserRegistry)).addResultReader(SignificantStringTerms.NAME, SignificantStringTerms::new).addResultReader(SignificantLongTerms.NAME, SignificantLongTerms::new).addResultReader(UnmappedSignificantTerms.NAME, UnmappedSignificantTerms::new));
    registerAggregation(new AggregationSpec(RangeAggregationBuilder.NAME, RangeAggregationBuilder::new, RangeAggregationBuilder::parse).addResultReader(InternalRange::new));
    registerAggregation(new AggregationSpec(DateRangeAggregationBuilder.NAME, DateRangeAggregationBuilder::new, DateRangeAggregationBuilder::parse).addResultReader(InternalDateRange::new));
    registerAggregation(new AggregationSpec(IpRangeAggregationBuilder.NAME, IpRangeAggregationBuilder::new, IpRangeAggregationBuilder::parse).addResultReader(InternalBinaryRange::new));
    registerAggregation(new AggregationSpec(HistogramAggregationBuilder.NAME, HistogramAggregationBuilder::new, HistogramAggregationBuilder::parse).addResultReader(InternalHistogram::new));
    registerAggregation(new AggregationSpec(DateHistogramAggregationBuilder.NAME, DateHistogramAggregationBuilder::new, DateHistogramAggregationBuilder::parse).addResultReader(InternalDateHistogram::new));
    registerAggregation(new AggregationSpec(GeoDistanceAggregationBuilder.NAME, GeoDistanceAggregationBuilder::new, GeoDistanceAggregationBuilder::parse).addResultReader(InternalGeoDistance::new));
    registerAggregation(new AggregationSpec(GeoGridAggregationBuilder.NAME, GeoGridAggregationBuilder::new, GeoGridAggregationBuilder::parse).addResultReader(InternalGeoHashGrid::new));
    registerAggregation(new AggregationSpec(NestedAggregationBuilder.NAME, NestedAggregationBuilder::new, NestedAggregationBuilder::parse).addResultReader(InternalNested::new));
    registerAggregation(new AggregationSpec(ReverseNestedAggregationBuilder.NAME, ReverseNestedAggregationBuilder::new, ReverseNestedAggregationBuilder::parse).addResultReader(InternalReverseNested::new));
    registerAggregation(new AggregationSpec(TopHitsAggregationBuilder.NAME, TopHitsAggregationBuilder::new, TopHitsAggregationBuilder::parse).addResultReader(InternalTopHits::new));
    registerAggregation(new AggregationSpec(GeoBoundsAggregationBuilder.NAME, GeoBoundsAggregationBuilder::new, GeoBoundsAggregationBuilder::parse).addResultReader(InternalGeoBounds::new));
    registerAggregation(new AggregationSpec(GeoCentroidAggregationBuilder.NAME, GeoCentroidAggregationBuilder::new, GeoCentroidAggregationBuilder::parse).addResultReader(InternalGeoCentroid::new));
    registerAggregation(new AggregationSpec(ScriptedMetricAggregationBuilder.NAME, ScriptedMetricAggregationBuilder::new, ScriptedMetricAggregationBuilder::parse).addResultReader(InternalScriptedMetric::new));
    registerAggregation(new AggregationSpec(ChildrenAggregationBuilder.NAME, ChildrenAggregationBuilder::new, ChildrenAggregationBuilder::parse).addResultReader(InternalChildren::new));
    registerFromPlugin(plugins, SearchPlugin::getAggregations, this::registerAggregation);
}
Also used : ReverseNestedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) StatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.StatsAggregationBuilder) ExtendedStatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder) ExtendedStatsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsAggregationBuilder) PipelineAggregationSpec(org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec) AggregationSpec(org.elasticsearch.plugins.SearchPlugin.AggregationSpec) RangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder) IpRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder) DateRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder) ScriptedMetricAggregationBuilder(org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregationBuilder) ValueCountAggregationBuilder(org.elasticsearch.search.aggregations.metrics.valuecount.ValueCountAggregationBuilder) MaxAggregationBuilder(org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder) AdjacencyMatrixAggregationBuilder(org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder) StringTerms(org.elasticsearch.search.aggregations.bucket.terms.StringTerms) SignificantStringTerms(org.elasticsearch.search.aggregations.bucket.significant.SignificantStringTerms) GeoDistanceAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.geodistance.GeoDistanceAggregationBuilder) InternalTDigestPercentiles(org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.InternalTDigestPercentiles) FiltersAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filters.FiltersAggregationBuilder) GeoBoundsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.geobounds.GeoBoundsAggregationBuilder) AvgAggregationBuilder(org.elasticsearch.search.aggregations.metrics.avg.AvgAggregationBuilder) NestedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder) ReverseNestedAggregationBuilder(org.elasticsearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) DateHistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder) HistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder) IpRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder) FilterAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder) SignificantLongTerms(org.elasticsearch.search.aggregations.bucket.significant.SignificantLongTerms) TopHitsAggregationBuilder(org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder) DateHistogramAggregationBuilder(org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder) InternalTDigestPercentileRanks(org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.InternalTDigestPercentileRanks) GeoCentroidAggregationBuilder(org.elasticsearch.search.aggregations.metrics.geocentroid.GeoCentroidAggregationBuilder) MissingAggregationBuilder(org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder) ChildrenAggregationBuilder(org.elasticsearch.search.aggregations.bucket.children.ChildrenAggregationBuilder) InternalSampler(org.elasticsearch.search.aggregations.bucket.sampler.InternalSampler) GlobalAggregationBuilder(org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder) SumAggregationBuilder(org.elasticsearch.search.aggregations.metrics.sum.SumAggregationBuilder) DateRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder) GeoGridAggregationBuilder(org.elasticsearch.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder) SearchPlugin(org.elasticsearch.plugins.SearchPlugin) MinAggregationBuilder(org.elasticsearch.search.aggregations.metrics.min.MinAggregationBuilder) CardinalityAggregationBuilder(org.elasticsearch.search.aggregations.metrics.cardinality.CardinalityAggregationBuilder) LongTerms(org.elasticsearch.search.aggregations.bucket.terms.LongTerms) SignificantLongTerms(org.elasticsearch.search.aggregations.bucket.significant.SignificantLongTerms) SignificantTermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder)

Aggregations

SearchPlugin (org.elasticsearch.plugins.SearchPlugin)2 AggregationSpec (org.elasticsearch.plugins.SearchPlugin.AggregationSpec)2 PipelineAggregationSpec (org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec)2 AdjacencyMatrixAggregationBuilder (org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder)2 ChildrenAggregationBuilder (org.elasticsearch.search.aggregations.bucket.children.ChildrenAggregationBuilder)2 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)2 FiltersAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filters.FiltersAggregationBuilder)2 GeoGridAggregationBuilder (org.elasticsearch.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder)2 GlobalAggregationBuilder (org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder)2 DateHistogramAggregationBuilder (org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder)2 HistogramAggregationBuilder (org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder)2 MissingAggregationBuilder (org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder)2 NestedAggregationBuilder (org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder)2 ReverseNestedAggregationBuilder (org.elasticsearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder)2 RangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder)2 DateRangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder)2 GeoDistanceAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.geodistance.GeoDistanceAggregationBuilder)2 IpRangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder)2 InternalSampler (org.elasticsearch.search.aggregations.bucket.sampler.InternalSampler)2 SignificantLongTerms (org.elasticsearch.search.aggregations.bucket.significant.SignificantLongTerms)2