Search in sources :

Example 1 with InternalHistogram

use of org.opensearch.search.aggregations.bucket.histogram.InternalHistogram in project OpenSearch by opensearch-project.

the class MinAggregatorTests method testEmptyBucket.

public void testEmptyBucket() throws IOException {
    HistogramAggregationBuilder histogram = new HistogramAggregationBuilder("histo").field("number").interval(1).minDocCount(0).subAggregation(new MinAggregationBuilder("min").field("number"));
    MappedFieldType fieldType = new NumberFieldMapper.NumberFieldType("number", NumberFieldMapper.NumberType.INTEGER);
    testCase(histogram, new MatchAllDocsQuery(), iw -> {
        iw.addDocument(singleton(new NumericDocValuesField("number", 1)));
        iw.addDocument(singleton(new NumericDocValuesField("number", 3)));
    }, (Consumer<InternalHistogram>) histo -> {
        assertThat(histo.getBuckets().size(), equalTo(3));
        assertNotNull(histo.getBuckets().get(0).getAggregations().asMap().get("min"));
        InternalMin min = (InternalMin) histo.getBuckets().get(0).getAggregations().asMap().get("min");
        assertEquals(1.0, min.getValue(), 0);
        assertTrue(AggregationInspectionHelper.hasValue(min));
        assertNotNull(histo.getBuckets().get(1).getAggregations().asMap().get("min"));
        min = (InternalMin) histo.getBuckets().get(1).getAggregations().asMap().get("min");
        assertEquals(Double.POSITIVE_INFINITY, min.getValue(), 0);
        assertFalse(AggregationInspectionHelper.hasValue(min));
        assertNotNull(histo.getBuckets().get(2).getAggregations().asMap().get("min"));
        min = (InternalMin) histo.getBuckets().get(2).getAggregations().asMap().get("min");
        assertEquals(3.0, min.getValue(), 0);
        assertTrue(AggregationInspectionHelper.hasValue(min));
    }, fieldType);
}
Also used : MultiReader(org.apache.lucene.index.MultiReader) Query(org.apache.lucene.search.Query) NoMergePolicy(org.apache.lucene.index.NoMergePolicy) Arrays(java.util.Arrays) InternalHistogram(org.opensearch.search.aggregations.bucket.histogram.InternalHistogram) ScriptModule(org.opensearch.script.ScriptModule) ScriptEngine(org.opensearch.script.ScriptEngine) BiFunction(java.util.function.BiFunction) SortedNumericDocValuesField(org.apache.lucene.document.SortedNumericDocValuesField) Term(org.apache.lucene.index.Term) ScriptType(org.opensearch.script.ScriptType) DoublePoint(org.apache.lucene.document.DoublePoint) Document(org.apache.lucene.document.Document) AggregationBuilder(org.opensearch.search.aggregations.AggregationBuilder) MapperService(org.opensearch.index.mapper.MapperService) Collections.singleton(java.util.Collections.singleton) Directory(org.apache.lucene.store.Directory) Map(java.util.Map) LeafReaderContext(org.apache.lucene.index.LeafReaderContext) MockScriptEngine(org.opensearch.script.MockScriptEngine) KeywordFieldMapper(org.opensearch.index.mapper.KeywordFieldMapper) AggregationInspectionHelper(org.opensearch.search.aggregations.support.AggregationInspectionHelper) QueryBuilders.termQuery(org.opensearch.index.query.QueryBuilders.termQuery) FilterAggregationBuilder(org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder) ScriptService(org.opensearch.script.ScriptService) NumericDocValuesField(org.apache.lucene.document.NumericDocValuesField) IpFieldMapper(org.opensearch.index.mapper.IpFieldMapper) SortedSetDocValuesField(org.apache.lucene.document.SortedSetDocValuesField) InetAddressPoint(org.apache.lucene.document.InetAddressPoint) BytesRef(org.apache.lucene.util.BytesRef) MappedFieldType(org.opensearch.index.mapper.MappedFieldType) DirectoryReader(org.apache.lucene.index.DirectoryReader) Script(org.opensearch.script.Script) LongTerms(org.opensearch.search.aggregations.bucket.terms.LongTerms) GlobalAggregationBuilder(org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder) Settings(org.opensearch.common.settings.Settings) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) Terms(org.opensearch.search.aggregations.bucket.terms.Terms) Tuple(org.opensearch.common.collect.Tuple) InternalTerms(org.opensearch.search.aggregations.bucket.terms.InternalTerms) IndexWriter(org.apache.lucene.index.IndexWriter) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) IndexSettings(org.opensearch.index.IndexSettings) QueryShardContext(org.opensearch.index.query.QueryShardContext) BigArrays(org.opensearch.common.util.BigArrays) IndexWriterConfig(org.apache.lucene.index.IndexWriterConfig) IndexReader(org.apache.lucene.index.IndexReader) IndexSearcher(org.apache.lucene.search.IndexSearcher) BucketOrder(org.opensearch.search.aggregations.BucketOrder) LongPoint(org.apache.lucene.document.LongPoint) HistogramAggregationBuilder(org.opensearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder) StringField(org.apache.lucene.document.StringField) CheckedConsumer(org.opensearch.common.CheckedConsumer) HashMap(java.util.HashMap) Function(java.util.function.Function) Supplier(java.util.function.Supplier) NumberFieldMapper(org.opensearch.index.mapper.NumberFieldMapper) ArrayList(java.util.ArrayList) IntPoint(org.apache.lucene.document.IntPoint) CoreValuesSourceType(org.opensearch.search.aggregations.support.CoreValuesSourceType) ValuesSourceType(org.opensearch.search.aggregations.support.ValuesSourceType) FloatPoint(org.apache.lucene.document.FloatPoint) AggregatorTestCase(org.opensearch.search.aggregations.AggregatorTestCase) Filter(org.opensearch.search.aggregations.bucket.filter.Filter) IOException(java.io.IOException) DocValuesFieldExistsQuery(org.apache.lucene.search.DocValuesFieldExistsQuery) InternalGlobal(org.opensearch.search.aggregations.bucket.global.InternalGlobal) Consumer(java.util.function.Consumer) Field(org.apache.lucene.document.Field) CircuitBreakerService(org.opensearch.indices.breaker.CircuitBreakerService) TermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder) LeafDocLookup(org.opensearch.search.lookup.LeafDocLookup) RandomIndexWriter(org.apache.lucene.index.RandomIndexWriter) Comparator(java.util.Comparator) Collections(java.util.Collections) HistogramAggregationBuilder(org.opensearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder) SortedNumericDocValuesField(org.apache.lucene.document.SortedNumericDocValuesField) NumericDocValuesField(org.apache.lucene.document.NumericDocValuesField) InternalHistogram(org.opensearch.search.aggregations.bucket.histogram.InternalHistogram) MappedFieldType(org.opensearch.index.mapper.MappedFieldType) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery)

Example 2 with InternalHistogram

use of org.opensearch.search.aggregations.bucket.histogram.InternalHistogram in project OpenSearch by opensearch-project.

the class SearchModule method registerAggregations.

private ValuesSourceRegistry registerAggregations(List<SearchPlugin> plugins) {
    ValuesSourceRegistry.Builder builder = new ValuesSourceRegistry.Builder();
    registerAggregation(new AggregationSpec(AvgAggregationBuilder.NAME, AvgAggregationBuilder::new, AvgAggregationBuilder.PARSER).addResultReader(InternalAvg::new).setAggregatorRegistrar(AvgAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(WeightedAvgAggregationBuilder.NAME, WeightedAvgAggregationBuilder::new, WeightedAvgAggregationBuilder.PARSER).addResultReader(InternalWeightedAvg::new).setAggregatorRegistrar(WeightedAvgAggregationBuilder::registerUsage), builder);
    registerAggregation(new AggregationSpec(SumAggregationBuilder.NAME, SumAggregationBuilder::new, SumAggregationBuilder.PARSER).addResultReader(InternalSum::new).setAggregatorRegistrar(SumAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(MinAggregationBuilder.NAME, MinAggregationBuilder::new, MinAggregationBuilder.PARSER).addResultReader(InternalMin::new).setAggregatorRegistrar(MinAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(MaxAggregationBuilder.NAME, MaxAggregationBuilder::new, MaxAggregationBuilder.PARSER).addResultReader(InternalMax::new).setAggregatorRegistrar(MaxAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(StatsAggregationBuilder.NAME, StatsAggregationBuilder::new, StatsAggregationBuilder.PARSER).addResultReader(InternalStats::new).setAggregatorRegistrar(StatsAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(ExtendedStatsAggregationBuilder.NAME, ExtendedStatsAggregationBuilder::new, ExtendedStatsAggregationBuilder.PARSER).addResultReader(InternalExtendedStats::new).setAggregatorRegistrar(ExtendedStatsAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(ValueCountAggregationBuilder.NAME, ValueCountAggregationBuilder::new, ValueCountAggregationBuilder.PARSER).addResultReader(InternalValueCount::new).setAggregatorRegistrar(ValueCountAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(PercentilesAggregationBuilder.NAME, PercentilesAggregationBuilder::new, PercentilesAggregationBuilder::parse).addResultReader(InternalTDigestPercentiles.NAME, InternalTDigestPercentiles::new).addResultReader(InternalHDRPercentiles.NAME, InternalHDRPercentiles::new).setAggregatorRegistrar(PercentilesAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(PercentileRanksAggregationBuilder.NAME, PercentileRanksAggregationBuilder::new, PercentileRanksAggregationBuilder::parse).addResultReader(InternalTDigestPercentileRanks.NAME, InternalTDigestPercentileRanks::new).addResultReader(InternalHDRPercentileRanks.NAME, InternalHDRPercentileRanks::new).setAggregatorRegistrar(PercentileRanksAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(MedianAbsoluteDeviationAggregationBuilder.NAME, MedianAbsoluteDeviationAggregationBuilder::new, MedianAbsoluteDeviationAggregationBuilder.PARSER).addResultReader(InternalMedianAbsoluteDeviation::new).setAggregatorRegistrar(MedianAbsoluteDeviationAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(CardinalityAggregationBuilder.NAME, CardinalityAggregationBuilder::new, CardinalityAggregationBuilder.PARSER).addResultReader(InternalCardinality::new).setAggregatorRegistrar(CardinalityAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(GlobalAggregationBuilder.NAME, GlobalAggregationBuilder::new, GlobalAggregationBuilder::parse).addResultReader(InternalGlobal::new), builder);
    registerAggregation(new AggregationSpec(MissingAggregationBuilder.NAME, MissingAggregationBuilder::new, MissingAggregationBuilder.PARSER).addResultReader(InternalMissing::new).setAggregatorRegistrar(MissingAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(FilterAggregationBuilder.NAME, FilterAggregationBuilder::new, FilterAggregationBuilder::parse).addResultReader(InternalFilter::new), builder);
    registerAggregation(new AggregationSpec(FiltersAggregationBuilder.NAME, FiltersAggregationBuilder::new, FiltersAggregationBuilder::parse).addResultReader(InternalFilters::new), builder);
    registerAggregation(new AggregationSpec(AdjacencyMatrixAggregationBuilder.NAME, AdjacencyMatrixAggregationBuilder::new, AdjacencyMatrixAggregationBuilder::parse).addResultReader(InternalAdjacencyMatrix::new), builder);
    registerAggregation(new AggregationSpec(SamplerAggregationBuilder.NAME, SamplerAggregationBuilder::new, SamplerAggregationBuilder::parse).addResultReader(InternalSampler.NAME, InternalSampler::new).addResultReader(UnmappedSampler.NAME, UnmappedSampler::new), builder);
    registerAggregation(new AggregationSpec(DiversifiedAggregationBuilder.NAME, DiversifiedAggregationBuilder::new, DiversifiedAggregationBuilder.PARSER).setAggregatorRegistrar(DiversifiedAggregationBuilder::registerAggregators), /* Reuses result readers from SamplerAggregator*/
    builder);
    registerAggregation(new AggregationSpec(TermsAggregationBuilder.NAME, TermsAggregationBuilder::new, TermsAggregationBuilder.PARSER).addResultReader(StringTerms.NAME, StringTerms::new).addResultReader(UnmappedTerms.NAME, UnmappedTerms::new).addResultReader(LongTerms.NAME, LongTerms::new).addResultReader(DoubleTerms.NAME, DoubleTerms::new).setAggregatorRegistrar(TermsAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(RareTermsAggregationBuilder.NAME, RareTermsAggregationBuilder::new, RareTermsAggregationBuilder.PARSER).addResultReader(StringRareTerms.NAME, StringRareTerms::new).addResultReader(UnmappedRareTerms.NAME, UnmappedRareTerms::new).addResultReader(LongRareTerms.NAME, LongRareTerms::new).setAggregatorRegistrar(RareTermsAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(SignificantTermsAggregationBuilder.NAME, SignificantTermsAggregationBuilder::new, SignificantTermsAggregationBuilder::parse).addResultReader(SignificantStringTerms.NAME, SignificantStringTerms::new).addResultReader(SignificantLongTerms.NAME, SignificantLongTerms::new).addResultReader(UnmappedSignificantTerms.NAME, UnmappedSignificantTerms::new).setAggregatorRegistrar(SignificantTermsAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(SignificantTextAggregationBuilder.NAME, SignificantTextAggregationBuilder::new, SignificantTextAggregationBuilder::parse), builder);
    registerAggregation(new AggregationSpec(RangeAggregationBuilder.NAME, RangeAggregationBuilder::new, RangeAggregationBuilder.PARSER).addResultReader(InternalRange::new).setAggregatorRegistrar(RangeAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(DateRangeAggregationBuilder.NAME, DateRangeAggregationBuilder::new, DateRangeAggregationBuilder.PARSER).addResultReader(InternalDateRange::new).setAggregatorRegistrar(DateRangeAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(IpRangeAggregationBuilder.NAME, IpRangeAggregationBuilder::new, IpRangeAggregationBuilder.PARSER).addResultReader(InternalBinaryRange::new).setAggregatorRegistrar(IpRangeAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(HistogramAggregationBuilder.NAME, HistogramAggregationBuilder::new, HistogramAggregationBuilder.PARSER).addResultReader(InternalHistogram::new).setAggregatorRegistrar(HistogramAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(DateHistogramAggregationBuilder.NAME, DateHistogramAggregationBuilder::new, DateHistogramAggregationBuilder.PARSER).addResultReader(InternalDateHistogram::new).setAggregatorRegistrar(DateHistogramAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(AutoDateHistogramAggregationBuilder.NAME, AutoDateHistogramAggregationBuilder::new, AutoDateHistogramAggregationBuilder.PARSER).addResultReader(InternalAutoDateHistogram::new).setAggregatorRegistrar(AutoDateHistogramAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(VariableWidthHistogramAggregationBuilder.NAME, VariableWidthHistogramAggregationBuilder::new, VariableWidthHistogramAggregationBuilder.PARSER).addResultReader(InternalVariableWidthHistogram::new).setAggregatorRegistrar(VariableWidthHistogramAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(GeoDistanceAggregationBuilder.NAME, GeoDistanceAggregationBuilder::new, GeoDistanceAggregationBuilder::parse).addResultReader(InternalGeoDistance::new).setAggregatorRegistrar(GeoDistanceAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(GeoHashGridAggregationBuilder.NAME, GeoHashGridAggregationBuilder::new, GeoHashGridAggregationBuilder.PARSER).addResultReader(InternalGeoHashGrid::new).setAggregatorRegistrar(GeoHashGridAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(GeoTileGridAggregationBuilder.NAME, GeoTileGridAggregationBuilder::new, GeoTileGridAggregationBuilder.PARSER).addResultReader(InternalGeoTileGrid::new).setAggregatorRegistrar(GeoTileGridAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(NestedAggregationBuilder.NAME, NestedAggregationBuilder::new, NestedAggregationBuilder::parse).addResultReader(InternalNested::new), builder);
    registerAggregation(new AggregationSpec(ReverseNestedAggregationBuilder.NAME, ReverseNestedAggregationBuilder::new, ReverseNestedAggregationBuilder::parse).addResultReader(InternalReverseNested::new), builder);
    registerAggregation(new AggregationSpec(TopHitsAggregationBuilder.NAME, TopHitsAggregationBuilder::new, TopHitsAggregationBuilder::parse).addResultReader(InternalTopHits::new), builder);
    registerAggregation(new AggregationSpec(GeoBoundsAggregationBuilder.NAME, GeoBoundsAggregationBuilder::new, GeoBoundsAggregationBuilder.PARSER).addResultReader(InternalGeoBounds::new).setAggregatorRegistrar(GeoBoundsAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(GeoCentroidAggregationBuilder.NAME, GeoCentroidAggregationBuilder::new, GeoCentroidAggregationBuilder.PARSER).addResultReader(InternalGeoCentroid::new).setAggregatorRegistrar(GeoCentroidAggregationBuilder::registerAggregators), builder);
    registerAggregation(new AggregationSpec(ScriptedMetricAggregationBuilder.NAME, ScriptedMetricAggregationBuilder::new, ScriptedMetricAggregationBuilder.PARSER).addResultReader(InternalScriptedMetric::new), builder);
    registerAggregation(new AggregationSpec(CompositeAggregationBuilder.NAME, CompositeAggregationBuilder::new, CompositeAggregationBuilder.PARSER).addResultReader(InternalComposite::new).setAggregatorRegistrar(CompositeAggregationBuilder::registerAggregators), builder);
    registerFromPlugin(plugins, SearchPlugin::getAggregations, (agg) -> this.registerAggregation(agg, builder));
    // after aggs have been registered, see if there are any new VSTypes that need to be linked to core fields
    registerFromPlugin(plugins, SearchPlugin::getAggregationExtentions, (registrar) -> {
        if (registrar != null) {
            registrar.accept(builder);
        }
    });
    return builder.build();
}
Also used : ReverseNestedAggregationBuilder(org.opensearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) UnmappedSignificantTerms(org.opensearch.search.aggregations.bucket.terms.UnmappedSignificantTerms) ScoreFunctionBuilder(org.opensearch.index.query.functionscore.ScoreFunctionBuilder) LinearDecayFunctionBuilder(org.opensearch.index.query.functionscore.LinearDecayFunctionBuilder) TermsSetQueryBuilder(org.opensearch.index.query.TermsSetQueryBuilder) FieldSortBuilder(org.opensearch.search.sort.FieldSortBuilder) FilterAggregationBuilder(org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder) BucketSortPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.BucketSortPipelineAggregationBuilder) ScriptScoreQueryBuilder(org.opensearch.index.query.functionscore.ScriptScoreQueryBuilder) DistanceFeatureQueryBuilder(org.opensearch.index.query.DistanceFeatureQueryBuilder) VariableWidthHistogramAggregationBuilder(org.opensearch.search.aggregations.bucket.histogram.VariableWidthHistogramAggregationBuilder) DerivativePipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.DerivativePipelineAggregationBuilder) BoostingQueryBuilder(org.opensearch.index.query.BoostingQueryBuilder) SpanNearQueryBuilder(org.opensearch.index.query.SpanNearQueryBuilder) TypeQueryBuilder(org.opensearch.index.query.TypeQueryBuilder) SuggestionBuilder(org.opensearch.search.suggest.SuggestionBuilder) SpanGapQueryBuilder(org.opensearch.index.query.SpanNearQueryBuilder.SpanGapQueryBuilder) TermsQueryBuilder(org.opensearch.index.query.TermsQueryBuilder) PrefixQueryBuilder(org.opensearch.index.query.PrefixQueryBuilder) DateHistogramAggregationBuilder(org.opensearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder) ConstantScoreQueryBuilder(org.opensearch.index.query.ConstantScoreQueryBuilder) SpanTermQueryBuilder(org.opensearch.index.query.SpanTermQueryBuilder) QueryRescorerBuilder(org.opensearch.search.rescore.QueryRescorerBuilder) GeoDistanceSortBuilder(org.opensearch.search.sort.GeoDistanceSortBuilder) MaxAggregationBuilder(org.opensearch.search.aggregations.metrics.MaxAggregationBuilder) FunctionScoreQueryBuilder(org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder) MoreLikeThisQueryBuilder(org.opensearch.index.query.MoreLikeThisQueryBuilder) CompletionSuggestionBuilder(org.opensearch.search.suggest.completion.CompletionSuggestionBuilder) CommonTermsQueryBuilder(org.opensearch.index.query.CommonTermsQueryBuilder) FieldMaskingSpanQueryBuilder(org.opensearch.index.query.FieldMaskingSpanQueryBuilder) GeoShapeQueryBuilder(org.opensearch.index.query.GeoShapeQueryBuilder) BaseAggregationBuilder(org.opensearch.search.aggregations.BaseAggregationBuilder) MinBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.MinBucketPipelineAggregationBuilder) AvgBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.AvgBucketPipelineAggregationBuilder) DateRangeAggregationBuilder(org.opensearch.search.aggregations.bucket.range.DateRangeAggregationBuilder) FieldValueFactorFunctionBuilder(org.opensearch.index.query.functionscore.FieldValueFactorFunctionBuilder) IntervalQueryBuilder(org.opensearch.index.query.IntervalQueryBuilder) SamplerAggregationBuilder(org.opensearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder) FiltersAggregationBuilder(org.opensearch.search.aggregations.bucket.filter.FiltersAggregationBuilder) MatchNoneQueryBuilder(org.opensearch.index.query.MatchNoneQueryBuilder) TopHitsAggregationBuilder(org.opensearch.search.aggregations.metrics.TopHitsAggregationBuilder) QueryBuilder(org.opensearch.index.query.QueryBuilder) DiversifiedAggregationBuilder(org.opensearch.search.aggregations.bucket.sampler.DiversifiedAggregationBuilder) ScriptSortBuilder(org.opensearch.search.sort.ScriptSortBuilder) SignificantTextAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.SignificantTextAggregationBuilder) FuzzyQueryBuilder(org.opensearch.index.query.FuzzyQueryBuilder) AutoDateHistogramAggregationBuilder(org.opensearch.search.aggregations.bucket.histogram.AutoDateHistogramAggregationBuilder) CompositeAggregationBuilder(org.opensearch.search.aggregations.bucket.composite.CompositeAggregationBuilder) GeoBoundingBoxQueryBuilder(org.opensearch.index.query.GeoBoundingBoxQueryBuilder) MatchPhraseQueryBuilder(org.opensearch.index.query.MatchPhraseQueryBuilder) MultiMatchQueryBuilder(org.opensearch.index.query.MultiMatchQueryBuilder) PercentileRanksAggregationBuilder(org.opensearch.search.aggregations.metrics.PercentileRanksAggregationBuilder) GeoTileGridAggregationBuilder(org.opensearch.search.aggregations.bucket.geogrid.GeoTileGridAggregationBuilder) GeoDistanceQueryBuilder(org.opensearch.index.query.GeoDistanceQueryBuilder) IdsQueryBuilder(org.opensearch.index.query.IdsQueryBuilder) AdjacencyMatrixAggregationBuilder(org.opensearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder) TermQueryBuilder(org.opensearch.index.query.TermQueryBuilder) RareTermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.RareTermsAggregationBuilder) StatsBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.StatsBucketPipelineAggregationBuilder) TermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder) MatchAllQueryBuilder(org.opensearch.index.query.MatchAllQueryBuilder) MovAvgPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.MovAvgPipelineAggregationBuilder) ExtendedStatsBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregationBuilder) RescorerBuilder(org.opensearch.search.rescore.RescorerBuilder) GaussDecayFunctionBuilder(org.opensearch.index.query.functionscore.GaussDecayFunctionBuilder) GeoDistanceAggregationBuilder(org.opensearch.search.aggregations.bucket.range.GeoDistanceAggregationBuilder) GeoBoundsAggregationBuilder(org.opensearch.search.aggregations.metrics.GeoBoundsAggregationBuilder) SpanNotQueryBuilder(org.opensearch.index.query.SpanNotQueryBuilder) PipelineAggregationBuilder(org.opensearch.search.aggregations.PipelineAggregationBuilder) IpRangeAggregationBuilder(org.opensearch.search.aggregations.bucket.range.IpRangeAggregationBuilder) WrapperQueryBuilder(org.opensearch.index.query.WrapperQueryBuilder) ExistsQueryBuilder(org.opensearch.index.query.ExistsQueryBuilder) SpanContainingQueryBuilder(org.opensearch.index.query.SpanContainingQueryBuilder) SignificantTermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.SignificantTermsAggregationBuilder) TermSuggestionBuilder(org.opensearch.search.suggest.term.TermSuggestionBuilder) GlobalAggregationBuilder(org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder) WildcardQueryBuilder(org.opensearch.index.query.WildcardQueryBuilder) CardinalityAggregationBuilder(org.opensearch.search.aggregations.metrics.CardinalityAggregationBuilder) GeoHashGridAggregationBuilder(org.opensearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder) SumBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.SumBucketPipelineAggregationBuilder) ValueCountAggregationBuilder(org.opensearch.search.aggregations.metrics.ValueCountAggregationBuilder) MinAggregationBuilder(org.opensearch.search.aggregations.metrics.MinAggregationBuilder) ScoreSortBuilder(org.opensearch.search.sort.ScoreSortBuilder) BoolQueryBuilder(org.opensearch.index.query.BoolQueryBuilder) ReverseNestedAggregationBuilder(org.opensearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) MissingAggregationBuilder(org.opensearch.search.aggregations.bucket.missing.MissingAggregationBuilder) MaxBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.MaxBucketPipelineAggregationBuilder) MatchPhrasePrefixQueryBuilder(org.opensearch.index.query.MatchPhrasePrefixQueryBuilder) RandomScoreFunctionBuilder(org.opensearch.index.query.functionscore.RandomScoreFunctionBuilder) SortBuilder(org.opensearch.search.sort.SortBuilder) GeoPolygonQueryBuilder(org.opensearch.index.query.GeoPolygonQueryBuilder) PhraseSuggestionBuilder(org.opensearch.search.suggest.phrase.PhraseSuggestionBuilder) StatsAggregationBuilder(org.opensearch.search.aggregations.metrics.StatsAggregationBuilder) MatchQueryBuilder(org.opensearch.index.query.MatchQueryBuilder) ScriptScoreFunctionBuilder(org.opensearch.index.query.functionscore.ScriptScoreFunctionBuilder) SumAggregationBuilder(org.opensearch.search.aggregations.metrics.SumAggregationBuilder) RegexpQueryBuilder(org.opensearch.index.query.RegexpQueryBuilder) RangeAggregationBuilder(org.opensearch.search.aggregations.bucket.range.RangeAggregationBuilder) SpanMultiTermQueryBuilder(org.opensearch.index.query.SpanMultiTermQueryBuilder) ExtendedStatsAggregationBuilder(org.opensearch.search.aggregations.metrics.ExtendedStatsAggregationBuilder) AggregationBuilder(org.opensearch.search.aggregations.AggregationBuilder) ScriptedMetricAggregationBuilder(org.opensearch.search.aggregations.metrics.ScriptedMetricAggregationBuilder) CumulativeSumPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.CumulativeSumPipelineAggregationBuilder) MedianAbsoluteDeviationAggregationBuilder(org.opensearch.search.aggregations.metrics.MedianAbsoluteDeviationAggregationBuilder) SerialDiffPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.SerialDiffPipelineAggregationBuilder) NestedQueryBuilder(org.opensearch.index.query.NestedQueryBuilder) MovFnPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.MovFnPipelineAggregationBuilder) SpanOrQueryBuilder(org.opensearch.index.query.SpanOrQueryBuilder) WeightedAvgAggregationBuilder(org.opensearch.search.aggregations.metrics.WeightedAvgAggregationBuilder) QueryStringQueryBuilder(org.opensearch.index.query.QueryStringQueryBuilder) BucketSelectorPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.BucketSelectorPipelineAggregationBuilder) PercentilesBucketPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.PercentilesBucketPipelineAggregationBuilder) SpanWithinQueryBuilder(org.opensearch.index.query.SpanWithinQueryBuilder) BucketScriptPipelineAggregationBuilder(org.opensearch.search.aggregations.pipeline.BucketScriptPipelineAggregationBuilder) MatchBoolPrefixQueryBuilder(org.opensearch.index.query.MatchBoolPrefixQueryBuilder) HistogramAggregationBuilder(org.opensearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder) AvgAggregationBuilder(org.opensearch.search.aggregations.metrics.AvgAggregationBuilder) ScriptQueryBuilder(org.opensearch.index.query.ScriptQueryBuilder) SpanFirstQueryBuilder(org.opensearch.index.query.SpanFirstQueryBuilder) DisMaxQueryBuilder(org.opensearch.index.query.DisMaxQueryBuilder) SimpleQueryStringBuilder(org.opensearch.index.query.SimpleQueryStringBuilder) GeoCentroidAggregationBuilder(org.opensearch.search.aggregations.metrics.GeoCentroidAggregationBuilder) ExponentialDecayFunctionBuilder(org.opensearch.index.query.functionscore.ExponentialDecayFunctionBuilder) PercentilesAggregationBuilder(org.opensearch.search.aggregations.metrics.PercentilesAggregationBuilder) RangeQueryBuilder(org.opensearch.index.query.RangeQueryBuilder) WeightBuilder(org.opensearch.index.query.functionscore.WeightBuilder) NestedAggregationBuilder(org.opensearch.search.aggregations.bucket.nested.NestedAggregationBuilder) PipelineAggregationSpec(org.opensearch.plugins.SearchPlugin.PipelineAggregationSpec) AggregationSpec(org.opensearch.plugins.SearchPlugin.AggregationSpec) ScriptedMetricAggregationBuilder(org.opensearch.search.aggregations.metrics.ScriptedMetricAggregationBuilder) InternalStats(org.opensearch.search.aggregations.metrics.InternalStats) InternalDateHistogram(org.opensearch.search.aggregations.bucket.histogram.InternalDateHistogram) InternalGeoCentroid(org.opensearch.search.aggregations.metrics.InternalGeoCentroid) InternalMedianAbsoluteDeviation(org.opensearch.search.aggregations.metrics.InternalMedianAbsoluteDeviation) ReverseNestedAggregationBuilder(org.opensearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder) NestedAggregationBuilder(org.opensearch.search.aggregations.bucket.nested.NestedAggregationBuilder) InternalRange(org.opensearch.search.aggregations.bucket.range.InternalRange) FilterAggregationBuilder(org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder) InternalMax(org.opensearch.search.aggregations.metrics.InternalMax) TopHitsAggregationBuilder(org.opensearch.search.aggregations.metrics.TopHitsAggregationBuilder) InternalHistogram(org.opensearch.search.aggregations.bucket.histogram.InternalHistogram) PercentilesAggregationBuilder(org.opensearch.search.aggregations.metrics.PercentilesAggregationBuilder) InternalGeoTileGrid(org.opensearch.search.aggregations.bucket.geogrid.InternalGeoTileGrid) RareTermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.RareTermsAggregationBuilder) TermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder) SignificantTermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.SignificantTermsAggregationBuilder) InternalHDRPercentileRanks(org.opensearch.search.aggregations.metrics.InternalHDRPercentileRanks) StringRareTerms(org.opensearch.search.aggregations.bucket.terms.StringRareTerms) InternalAutoDateHistogram(org.opensearch.search.aggregations.bucket.histogram.InternalAutoDateHistogram) InternalExtendedStats(org.opensearch.search.aggregations.metrics.InternalExtendedStats) DiversifiedAggregationBuilder(org.opensearch.search.aggregations.bucket.sampler.DiversifiedAggregationBuilder) InternalGeoDistance(org.opensearch.search.aggregations.bucket.range.InternalGeoDistance) InternalSum(org.opensearch.search.aggregations.metrics.InternalSum) DoubleTerms(org.opensearch.search.aggregations.bucket.terms.DoubleTerms) ValuesSourceRegistry(org.opensearch.search.aggregations.support.ValuesSourceRegistry) AdjacencyMatrixAggregationBuilder(org.opensearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder) InternalMissing(org.opensearch.search.aggregations.bucket.missing.InternalMissing) InternalAvg(org.opensearch.search.aggregations.metrics.InternalAvg) InternalMin(org.opensearch.search.aggregations.metrics.InternalMin) SignificantStringTerms(org.opensearch.search.aggregations.bucket.terms.SignificantStringTerms) FiltersAggregationBuilder(org.opensearch.search.aggregations.bucket.filter.FiltersAggregationBuilder) InternalHDRPercentiles(org.opensearch.search.aggregations.metrics.InternalHDRPercentiles) InternalVariableWidthHistogram(org.opensearch.search.aggregations.bucket.histogram.InternalVariableWidthHistogram) InternalCardinality(org.opensearch.search.aggregations.metrics.InternalCardinality) LongRareTerms(org.opensearch.search.aggregations.bucket.terms.LongRareTerms) PercentileRanksAggregationBuilder(org.opensearch.search.aggregations.metrics.PercentileRanksAggregationBuilder) InternalWeightedAvg(org.opensearch.search.aggregations.metrics.InternalWeightedAvg) InternalGeoHashGrid(org.opensearch.search.aggregations.bucket.geogrid.InternalGeoHashGrid) InternalDateRange(org.opensearch.search.aggregations.bucket.range.InternalDateRange) InternalSampler(org.opensearch.search.aggregations.bucket.sampler.InternalSampler) GlobalAggregationBuilder(org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder) InternalValueCount(org.opensearch.search.aggregations.metrics.InternalValueCount) SearchPlugin(org.opensearch.plugins.SearchPlugin) InternalComposite(org.opensearch.search.aggregations.bucket.composite.InternalComposite) InternalGeoBounds(org.opensearch.search.aggregations.metrics.InternalGeoBounds) InternalBinaryRange(org.opensearch.search.aggregations.bucket.range.InternalBinaryRange) UnmappedTerms(org.opensearch.search.aggregations.bucket.terms.UnmappedTerms)

Aggregations

IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 Collections.singleton (java.util.Collections.singleton)1 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 BiFunction (java.util.function.BiFunction)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1 Supplier (java.util.function.Supplier)1 Document (org.apache.lucene.document.Document)1 DoublePoint (org.apache.lucene.document.DoublePoint)1 Field (org.apache.lucene.document.Field)1 FloatPoint (org.apache.lucene.document.FloatPoint)1 InetAddressPoint (org.apache.lucene.document.InetAddressPoint)1 IntPoint (org.apache.lucene.document.IntPoint)1 LongPoint (org.apache.lucene.document.LongPoint)1