Class LeafBucketCollectorBase
- java.lang.Object
-
- org.elasticsearch.search.aggregations.LeafBucketCollector
-
- org.elasticsearch.search.aggregations.LeafBucketCollectorBase
-
- All Implemented Interfaces:
LeafCollector
public class LeafBucketCollectorBase extends LeafBucketCollector
ALeafBucketCollectorthat delegates all calls to the sub leaf aggregator and sets the scorer on its source of values if it implementsScorerAware.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.aggregations.LeafBucketCollector
NO_OP_COLLECTOR
-
-
Constructor Summary
Constructors Constructor Description LeafBucketCollectorBase(LeafBucketCollector sub, Object values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(int doc, long bucket)Collect the given doc in the given bucket.voidsetScorer(Scorable s)Called before successive calls toLeafCollector.collect(int).-
Methods inherited from class org.elasticsearch.search.aggregations.LeafBucketCollector
collect, wrap
-
-
-
-
Constructor Detail
-
LeafBucketCollectorBase
public LeafBucketCollectorBase(LeafBucketCollector sub, Object values)
- Parameters:
sub- The leaf collector for sub aggregations.values- The values.ScorerAware.setScorer(org.apache.lucene.search.Scorable)will be called automatically on them if they implementScorerAware.
-
-
Method Detail
-
setScorer
public void setScorer(Scorable s) throws IOException
Description copied from interface:LeafCollectorCalled before successive calls toLeafCollector.collect(int). Implementations that need the score of the current document (passed-in toLeafCollector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.- Specified by:
setScorerin interfaceLeafCollector- Overrides:
setScorerin classLeafBucketCollector- Throws:
IOException
-
collect
public void collect(int doc, long bucket) throws IOExceptionDescription copied from class:LeafBucketCollectorCollect the given doc in the given bucket.- Specified by:
collectin classLeafBucketCollector- Throws:
IOException
-
-