public class FilteringBucketCollector extends BucketCollector implements Releasable
BucketCollector.BucketAnalysisCollector
NO_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) |
wrap
public 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 ReaderContextAware
public final void collect(int docId, long bucketOrdinal) throws IOException
BucketCollector
collect
in class BucketCollector
bucketOrdinal
- 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 final void postCollection() throws IOException
BucketCollector
postCollection
in class BucketCollector
IOException
public void close() throws ElasticsearchException
close
in interface AutoCloseable
close
in interface Releasable
ElasticsearchException
public void gatherAnalysis(BucketCollector.BucketAnalysisCollector analysisCollector, long bucketOrdinal)
BucketCollector
gatherAnalysis
in class BucketCollector
Copyright © 2009–2015. All rights reserved.