public class FilteringBucketCollector extends BucketCollector implements Releasable
BucketCollector.BucketAnalysisCollectorNO_OP_COLLECTOR| Constructor and Description |
|---|
FilteringBucketCollector(long[] validBucketOrds,
BucketCollector delegate,
BigArrays bigArrays) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
collect(int docId,
long bucketOrdinal)
Called during the query phase, to collect & aggregate the given document.
|
void |
gatherAnalysis(BucketCollector.BucketAnalysisCollector analysisCollector,
long bucketOrdinal)
Called post-collection to gather the results from surviving buckets.
|
void |
postCollection()
Post collection callback.
|
void |
setNextReader(org.apache.lucene.index.AtomicReaderContext reader) |
wrappublic FilteringBucketCollector(long[] validBucketOrds,
BucketCollector delegate,
BigArrays bigArrays)
the - valid BucketOrdsdelegate - The collector that will be called for any buckets listed in sortedBucketOrdspublic final void setNextReader(org.apache.lucene.index.AtomicReaderContext reader)
setNextReader in interface ReaderContextAwarepublic final void collect(int docId,
long bucketOrdinal)
throws IOException
BucketCollectorcollect in class BucketCollectorbucketOrdinal - 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 final void postCollection()
throws IOException
BucketCollectorpostCollection in class BucketCollectorIOExceptionpublic void close()
throws ElasticsearchException
close in interface AutoCloseableclose in interface ReleasableElasticsearchExceptionpublic void gatherAnalysis(BucketCollector.BucketAnalysisCollector analysisCollector, long bucketOrdinal)
BucketCollectorgatherAnalysis in class BucketCollectorCopyright © 2009–2016. All rights reserved.