public abstract class AbstractPercentilesAggregator extends NumericMetricsAggregator.MultiValue
NumericMetricsAggregator.MultiValue, NumericMetricsAggregator.SingleValueAggregator.BucketAggregationMode, Aggregator.Parser, Aggregator.SubAggCollectionModeBucketCollector.BucketAnalysisCollector| Modifier and Type | Field and Description |
|---|---|
protected double |
compression |
protected ValueFormatter |
formatter |
protected boolean |
keyed |
protected double[] |
keys |
protected ObjectArray<TDigestState> |
states |
protected ValuesSource.Numeric |
valuesSource |
bigArrays, bucketAggregationMode, COLLECT_MODE, collectableSubAggregators, context, depth, estimatedBucketCount, factories, name, parent, subAggregatorsNO_OP_COLLECTOR| Constructor and Description |
|---|
AbstractPercentilesAggregator(String name,
long estimatedBucketsCount,
ValuesSource.Numeric valuesSource,
AggregationContext context,
Aggregator parent,
double[] keys,
double compression,
boolean keyed,
ValueFormatter formatter) |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(int doc,
long bucketOrd)
Called during the query phase, to collect & aggregate the given document.
|
protected void |
doClose()
Release instance-specific data.
|
protected TDigestState |
getState(long bucketOrd) |
boolean |
hasMetric(String name) |
void |
setNextReader(org.apache.lucene.index.AtomicReaderContext reader) |
boolean |
shouldCollect() |
metricbucketAggregationMode, buildAggregation, buildEmptyAggregation, buildEmptySubAggregations, close, context, depth, doPostCollection, estimatedBucketCount, gatherAnalysis, hasParentBucketAggregator, name, parent, postCollection, preCollection, runDeferredCollections, shouldDefer, subAggregator, subAggregatorswrapprotected final double[] keys
protected final ValuesSource.Numeric valuesSource
protected ObjectArray<TDigestState> states
protected final double compression
protected final boolean keyed
protected ValueFormatter formatter
public AbstractPercentilesAggregator(String name, long estimatedBucketsCount, ValuesSource.Numeric valuesSource, AggregationContext context, Aggregator parent, double[] keys, double compression, boolean keyed, @Nullable ValueFormatter formatter)
public boolean shouldCollect()
shouldCollect in class Aggregatorpublic void setNextReader(org.apache.lucene.index.AtomicReaderContext reader)
public void collect(int doc,
long bucketOrd)
throws IOException
BucketCollectorcollect in class BucketCollectorbucketOrd - The ordinal of the bucket this aggregator belongs to, assuming this aggregator is not a top level aggregator.
Typically, aggregators with #bucketAggregationMode set to Aggregator.BucketAggregationMode.MULTI_BUCKETS
will heavily depend on this ordinal. Other aggregators may or may not use it and can see this ordinal as just
an extra information for the aggregation context. For top level aggregators, the ordinal will always be
equal to 0.IOExceptionpublic boolean hasMetric(String name)
hasMetric in class NumericMetricsAggregator.MultiValueprotected TDigestState getState(long bucketOrd)
protected void doClose()
AggregatordoClose in class AggregatorCopyright © 2009–2016. All rights reserved.