public static class GlobalOrdinalsStringTermsAggregator.LowCardinality extends GlobalOrdinalsStringTermsAggregator
GlobalOrdinalsStringTermsAggregator
that resolves global ordinals post segment collection
instead of on the fly for each match.This is beneficial for low cardinality fields, because it can reduce
the amount of look-ups significantly.GlobalOrdinalsStringTermsAggregator.LowCardinality, GlobalOrdinalsStringTermsAggregator.WithHash
TermsAggregator.BucketCountThresholds
Aggregator.BucketAggregationMode, Aggregator.Parser, Aggregator.SubAggCollectionMode
BucketCollector.BucketAnalysisCollector
Modifier and Type | Field and Description |
---|---|
protected boolean |
showTermDocCountError |
acceptedGlobalOrdinals, collector, globalOrds, includeExclude, valuesSource
aggsUsedForSorting, bucketCountThresholds, order, subAggCollectMode
bigArrays, bucketAggregationMode, COLLECT_MODE, collectableSubAggregators, context, depth, estimatedBucketCount, factories, name, parent, subAggregators
NO_OP_COLLECTOR
Constructor and Description |
---|
LowCardinality(String name,
AggregatorFactories factories,
ValuesSource.Bytes.WithOrdinals.FieldData valuesSource,
long estimatedBucketCount,
long maxOrd,
Terms.Order order,
TermsAggregator.BucketCountThresholds bucketCountThresholds,
AggregationContext aggregationContext,
Aggregator parent,
Aggregator.SubAggCollectionMode collectionMode,
boolean showTermDocCountError) |
Modifier and Type | Method and Description |
---|---|
InternalAggregation |
buildEmptyAggregation() |
protected void |
doClose()
Release instance-specific data.
|
protected void |
doPostCollection()
Can be overriden by aggregator implementation to be called back when the collection phase ends.
|
protected org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.Collector |
newCollector(org.apache.lucene.index.RandomAccessOrds ords) |
void |
setNextReader(org.apache.lucene.index.AtomicReaderContext reader) |
buildAggregation, collect, copy, getBucketOrd, shouldCollect
shouldDefer
bucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectBucketNoCounts, collectExistingBucket, getDocCounts, incrementBucketDocCount, maxBucketOrd
bucketAggregationMode, buildEmptySubAggregations, context, depth, estimatedBucketCount, gatherAnalysis, hasParentBucketAggregator, name, parent, postCollection, preCollection, runDeferredCollections, subAggregator, subAggregators
wrap
public LowCardinality(String name, AggregatorFactories factories, ValuesSource.Bytes.WithOrdinals.FieldData valuesSource, long estimatedBucketCount, long maxOrd, Terms.Order order, TermsAggregator.BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, Aggregator.SubAggCollectionMode collectionMode, boolean showTermDocCountError)
protected org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.Collector newCollector(org.apache.lucene.index.RandomAccessOrds ords)
newCollector
in class GlobalOrdinalsStringTermsAggregator
public void setNextReader(org.apache.lucene.index.AtomicReaderContext reader)
setNextReader
in interface ReaderContextAware
setNextReader
in class GlobalOrdinalsStringTermsAggregator
protected void doPostCollection()
Aggregator
doPostCollection
in class Aggregator
protected void doClose()
Aggregator
doClose
in class Aggregator
public InternalAggregation buildEmptyAggregation()
buildEmptyAggregation
in class Aggregator
Copyright © 2009–2015. All rights reserved.