Class GlobalOrdinalsStringTermsAggregator
java.lang.Object
org.opensearch.search.aggregations.BucketCollector
org.opensearch.search.aggregations.Aggregator
org.opensearch.search.aggregations.AggregatorBase
org.opensearch.search.aggregations.bucket.BucketsAggregator
org.opensearch.search.aggregations.bucket.DeferableBucketAggregator
org.opensearch.search.aggregations.bucket.terms.TermsAggregator
org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.lucene.search.Collector
,org.opensearch.common.lease.Releasable
An aggregator of string values that relies on global ordinals in order to build buckets.
- Opensearch.internal:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Lookup global ordinalsNested classes/interfaces inherited from class org.opensearch.search.aggregations.bucket.terms.TermsAggregator
TermsAggregator.BucketCountThresholds, TermsAggregator.CoordinatorBucketCountThresholds
Nested classes/interfaces inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
BucketsAggregator.BucketBuilderForFixedCount<B>, BucketsAggregator.BucketBuilderForVariable<B>, BucketsAggregator.ResultBuilderForVariable<B>, BucketsAggregator.SingleBucketResultBuilder
Nested classes/interfaces inherited from class org.opensearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.CollectionStrategy
protected final org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.ResultStrategy
<?, ?, ?> protected int
protected int
protected final boolean
protected final ValuesSource.Bytes.WithOrdinals
Fields inherited from class org.opensearch.search.aggregations.bucket.terms.TermsAggregator
aggsUsedForSorting, bucketCountThresholds, collectMode, format, order, partiallyBuiltBucketComparator
Fields inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
docCountProvider
Fields inherited from class org.opensearch.search.aggregations.AggregatorBase
collectableSubAggregators, context, DEFAULT_WEIGHT, name, parent, subAggregators
Fields inherited from class org.opensearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR
-
Constructor Summary
ConstructorDescriptionGlobalOrdinalsStringTermsAggregator
(String name, AggregatorFactories factories, Function<GlobalOrdinalsStringTermsAggregator, org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.ResultStrategy<?, ?, ?>> resultStrategy, ValuesSource.Bytes.WithOrdinals valuesSource, BucketOrder order, DocValueFormat format, TermsAggregator.BucketCountThresholds bucketCountThresholds, IncludeExclude.OrdinalsFilter includeExclude, SearchContext context, Aggregator parent, boolean remapGlobalOrds, Aggregator.SubAggCollectionMode collectionMode, boolean showTermDocCountError, CardinalityUpperBound cardinality, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionbuildAggregations
(long[] owningBucketOrds) Build the results of this aggregation.Build an empty aggregation.protected SignificantStringTerms
buildEmptySignificantTermsAggregation
(long subsetSize, SignificanceHeuristic significanceHeuristic) protected StringTerms
void
Collect debug information to add to the profiling results.protected void
doClose()
Release instance-specific data.getLeafCollector
(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) Get aLeafBucketCollector
for the given ctx, which should delegate to the given collector.void
setWeight
(org.apache.lucene.search.Weight weight) Methods inherited from class org.opensearch.search.aggregations.bucket.terms.TermsAggregator
shouldDefer
Methods inherited from class org.opensearch.search.aggregations.bucket.DeferableBucketAggregator
beforeBuildingBuckets, doPreCollection, getDeferringCollector
Methods inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
bucketComparator, bucketDocCount, buildAggregationsForFixedBucketCount, buildAggregationsForSingleBucket, buildAggregationsForVariableBuckets, buildSubAggsForAllBuckets, buildSubAggsForBuckets, buildSubAggsForBuckets, close, collectBucket, collectExistingBucket, descendsFromGlobalAggregator, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, mergeBuckets, mergeBuckets, preGetSubLeafCollectors, resolveSortPath
Methods inherited from class org.opensearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, buildEmptySubAggregations, context, doPostCollection, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, scoreMode, subAggregator, subAggregators, toString
Methods inherited from class org.opensearch.search.aggregations.Aggregator
buildTopLevel, getPostCollectionAggregation, resolveSortPathOnValidAgg
-
Field Details
-
resultStrategy
protected final org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.ResultStrategy<?,?, resultStrategy?> -
valuesSource
-
collectionStrategy
protected final org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.CollectionStrategy collectionStrategy -
segmentsWithSingleValuedOrds
protected int segmentsWithSingleValuedOrds -
segmentsWithMultiValuedOrds
protected int segmentsWithMultiValuedOrds -
showTermDocCountError
protected final boolean showTermDocCountError
-
-
Constructor Details
-
GlobalOrdinalsStringTermsAggregator
public GlobalOrdinalsStringTermsAggregator(String name, AggregatorFactories factories, Function<GlobalOrdinalsStringTermsAggregator, org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.ResultStrategy<?, throws IOException?, ?>> resultStrategy, ValuesSource.Bytes.WithOrdinals valuesSource, BucketOrder order, DocValueFormat format, TermsAggregator.BucketCountThresholds bucketCountThresholds, IncludeExclude.OrdinalsFilter includeExclude, SearchContext context, Aggregator parent, boolean remapGlobalOrds, Aggregator.SubAggCollectionMode collectionMode, boolean showTermDocCountError, CardinalityUpperBound cardinality, Map<String, Object> metadata) - Throws:
IOException
-
-
Method Details
-
setWeight
public void setWeight(org.apache.lucene.search.Weight weight) -
getLeafCollector
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) throws IOException Description copied from class:AggregatorBase
Get aLeafBucketCollector
for the given ctx, which should delegate to the given collector.- Specified by:
getLeafCollector
in classAggregatorBase
- Throws:
IOException
-
buildAggregations
Description copied from class:Aggregator
Build the results of this aggregation.- Specified by:
buildAggregations
in classAggregator
- Parameters:
owningBucketOrds
- the ordinals of the buckets that we want to collect from this aggregation- Returns:
- the results for each ordinal, in the same order as the array of ordinals
- Throws:
IOException
-
buildEmptyAggregation
Description copied from class:Aggregator
Build an empty aggregation.- Specified by:
buildEmptyAggregation
in classAggregator
-
collectDebugInfo
Description copied from class:Aggregator
Collect debug information to add to the profiling results. This will only be called if the aggregation is being profiled.Well behaved implementations will always call the superclass implementation just in case it has something interesting. They will also only add objects which can be serialized with
StreamOutput.writeGenericValue(Object)
andXContentBuilder.value(Object)
. And they'll have an integration test.- Overrides:
collectDebugInfo
in classDeferableBucketAggregator
-
doClose
protected void doClose()Description copied from class:AggregatorBase
Release instance-specific data.- Overrides:
doClose
in classAggregatorBase
-
buildEmptyTermsAggregation
-
buildEmptySignificantTermsAggregation
protected SignificantStringTerms buildEmptySignificantTermsAggregation(long subsetSize, SignificanceHeuristic significanceHeuristic)
-