public class RecordingPerReaderBucketCollector extends RecordingBucketCollector
BucketCollector.BucketAnalysisCollector
NO_OP_COLLECTOR
Constructor and Description |
---|
RecordingPerReaderBucketCollector(AggregationContext context) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
collect(int doc,
long owningBucketOrdinal)
Called during the query phase, to collect & aggregate the given document.
|
void |
postCollection()
Post collection callback.
|
void |
replayCollection(BucketCollector collector)
Replay a previously executed set of calls to the
BucketCollector.collect(int, long) method |
void |
setNextReader(org.apache.lucene.index.AtomicReaderContext reader) |
gatherAnalysis
wrap
public RecordingPerReaderBucketCollector(AggregationContext context)
public void setNextReader(org.apache.lucene.index.AtomicReaderContext reader)
public void collect(int doc, long owningBucketOrdinal) throws IOException
BucketCollector
collect
in class BucketCollector
owningBucketOrdinal
- 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.IOException
public void replayCollection(BucketCollector collector) throws IOException
RecordingBucketCollector
BucketCollector.collect(int, long)
methodreplayCollection
in class RecordingBucketCollector
collector
- the object which will be called to handle the playbackIOException
public void postCollection() throws IOException
BucketCollector
postCollection
in class BucketCollector
IOException
public void close() throws ElasticsearchException
ElasticsearchException
Copyright © 2009–2015. All rights reserved.