Interface GroupingAggregatorFunction.AddInput
- All Superinterfaces:
AutoCloseable,Closeable,org.elasticsearch.core.Releasable
- Enclosing interface:
GroupingAggregatorFunction
GroupingAggregatorFunction
to group values at a particular position into a particular group.-
Method Summary
Methods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
add
Send a batch of group ids to the aggregator. ThegroupIdsmay be offset from the start of the block to allow for sending chunks of group ids.Any single position may be collected into arbitrarily many group ids. Often it's just one, but it's quite possible for a single position to be collected into thousands or millions of group ids. The
positionOffsetcontrols the start of the chunk of group ids contained ingroupIds.It is possible for an input position to be cut into more than one chunk. In other words, it's possible for this method to be called multiple times with the same
positionOffsetand agroupIdsBlock that contains thousands of values at a single positions.Finally, it's possible for a single position to be collected into groupIds. In that case it's positionOffset may be skipped entirely or the groupIds block could contain a
nullvalue at that position.- Parameters:
positionOffset- offset into thePageused to build thisGroupingAggregatorFunction.AddInputof these idsgroupIds-Blockof group id, some of which may be null or multivalued
-
add
Send a batch of group ids to the aggregator. ThegroupIdsmay be offset from the start of the block to allow for sending chunks of group ids.See
add(int, IntBlock)for discussion on the offset. This method can only be called with blocks contained in aVectorwhich only allows a single value per position.- Parameters:
positionOffset- offset into thePageused to build thisGroupingAggregatorFunction.AddInputof these idsgroupIds-Vectorof group id, some of which may be null or multivalued
-