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.Parser, Aggregator.SubAggCollectionMode
Modifier and Type | Field and Description |
---|---|
protected boolean |
showTermDocCountError |
acceptedGlobalOrdinals, globalOrds, includeExclude, valuesSource
aggsUsedForSorting, bucketCountThresholds, collectMode, order
collectableSubAggregators, context, name, parent, subAggregators
NO_OP_COLLECTOR
Constructor and Description |
---|
GlobalOrdinalsStringTermsAggregator.LowCardinality(String name,
AggregatorFactories factories,
ValuesSource.Bytes.WithOrdinals valuesSource,
Terms.Order order,
TermsAggregator.BucketCountThresholds bucketCountThresholds,
AggregationContext aggregationContext,
Aggregator parent,
Aggregator.SubAggCollectionMode collectionMode,
boolean showTermDocCountError,
List<PipelineAggregator> pipelineAggregators,
Map<String,Object> metaData) |
Modifier and Type | Method and Description |
---|---|
InternalAggregation |
buildEmptyAggregation()
Build an empty aggregation.
|
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.
|
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) |
buildAggregation, copy, getBucketOrd
shouldDefer
bucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectExistingBucket, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd
buildEmptySubAggregations, context, doPreCollection, getDeferringCollector, getLeafCollector, metaData, name, needsScores, parent, pipelineAggregators, postCollection, preCollection, runDeferredCollections, subAggregator, subAggregators, toString
descendsFromBucketAggregator
wrap
public GlobalOrdinalsStringTermsAggregator.LowCardinality(String name, AggregatorFactories factories, ValuesSource.Bytes.WithOrdinals valuesSource, Terms.Order order, TermsAggregator.BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, Aggregator.SubAggCollectionMode collectionMode, boolean showTermDocCountError, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData) throws IOException
IOException
protected LeafBucketCollector newCollector(org.apache.lucene.index.RandomAccessOrds ords, LeafBucketCollector sub)
newCollector
in class GlobalOrdinalsStringTermsAggregator
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) throws IOException
AggregatorBase
LeafBucketCollector
for the given ctx, which should
delegate to the given collector.getLeafCollector
in class GlobalOrdinalsStringTermsAggregator
IOException
protected void doPostCollection()
AggregatorBase
doPostCollection
in class AggregatorBase
protected void doClose()
AggregatorBase
doClose
in class AggregatorBase
public InternalAggregation buildEmptyAggregation()
Aggregator
buildEmptyAggregation
in class Aggregator
Copyright © 2009–2017. All rights reserved.