public class GlobalOrdinalsStringTermsAggregator extends TermsAggregator
Modifier and Type | Class and Description |
---|---|
static class |
GlobalOrdinalsStringTermsAggregator.LowCardinality
Variant of
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. |
static class |
GlobalOrdinalsStringTermsAggregator.WithHash
Variant of
GlobalOrdinalsStringTermsAggregator that rebases hashes in order to make them dense. |
TermsAggregator.BucketCountThresholds
Aggregator.Parser, Aggregator.SubAggCollectionMode
Modifier and Type | Field and Description |
---|---|
protected org.apache.lucene.util.LongBitSet |
acceptedGlobalOrdinals |
protected org.apache.lucene.index.RandomAccessOrds |
globalOrds |
protected IncludeExclude.OrdinalsFilter |
includeExclude |
protected boolean |
showTermDocCountError |
protected ValuesSource.Bytes.WithOrdinals |
valuesSource |
aggsUsedForSorting, bucketCountThresholds, collectMode, order
collectableSubAggregators, context, name, parent, subAggregators
NO_OP_COLLECTOR
Constructor and Description |
---|
GlobalOrdinalsStringTermsAggregator(java.lang.String name,
AggregatorFactories factories,
ValuesSource.Bytes.WithOrdinals valuesSource,
Terms.Order order,
TermsAggregator.BucketCountThresholds bucketCountThresholds,
IncludeExclude.OrdinalsFilter includeExclude,
AggregationContext aggregationContext,
Aggregator parent,
Aggregator.SubAggCollectionMode collectionMode,
boolean showTermDocCountError,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Modifier and Type | Method and Description |
---|---|
InternalAggregation |
buildAggregation(long owningBucketOrdinal)
Build an aggregation for data that has been collected into
bucket . |
InternalAggregation |
buildEmptyAggregation()
Build an empty aggregation.
|
protected static void |
copy(org.apache.lucene.util.BytesRef from,
org.apache.lucene.util.BytesRef to) |
protected long |
getBucketOrd(long termOrd) |
LeafBucketCollector |
getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx,
LeafBucketCollector sub)
Get a
LeafBucketCollector for the given ctx, which should
delegate to the given collector. |
protected LeafBucketCollector |
newCollector(org.apache.lucene.index.RandomAccessOrds ords,
LeafBucketCollector sub) |
shouldDefer
bucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectExistingBucket, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd
buildEmptySubAggregations, context, doClose, doPostCollection, doPreCollection, getDeferringCollector, getLeafCollector, metaData, name, needsScores, parent, pipelineAggregators, postCollection, preCollection, runDeferredCollections, subAggregator, subAggregators, toString
descendsFromBucketAggregator
wrap
protected final ValuesSource.Bytes.WithOrdinals valuesSource
protected final IncludeExclude.OrdinalsFilter includeExclude
protected org.apache.lucene.util.LongBitSet acceptedGlobalOrdinals
protected org.apache.lucene.index.RandomAccessOrds globalOrds
protected final boolean showTermDocCountError
public GlobalOrdinalsStringTermsAggregator(java.lang.String name, AggregatorFactories factories, ValuesSource.Bytes.WithOrdinals valuesSource, Terms.Order order, TermsAggregator.BucketCountThresholds bucketCountThresholds, IncludeExclude.OrdinalsFilter includeExclude, AggregationContext aggregationContext, Aggregator parent, Aggregator.SubAggCollectionMode collectionMode, boolean showTermDocCountError, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
java.io.IOException
protected long getBucketOrd(long termOrd)
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) throws java.io.IOException
AggregatorBase
LeafBucketCollector
for the given ctx, which should
delegate to the given collector.getLeafCollector
in class AggregatorBase
java.io.IOException
protected LeafBucketCollector newCollector(org.apache.lucene.index.RandomAccessOrds ords, LeafBucketCollector sub)
protected static void copy(org.apache.lucene.util.BytesRef from, org.apache.lucene.util.BytesRef to)
public InternalAggregation buildAggregation(long owningBucketOrdinal) throws java.io.IOException
Aggregator
bucket
.buildAggregation
in class Aggregator
java.io.IOException
public InternalAggregation buildEmptyAggregation()
Aggregator
buildEmptyAggregation
in class Aggregator