Module org.elasticsearch.compute
Class BooleanBucketedSort
java.lang.Object
org.elasticsearch.compute.data.sort.BooleanBucketedSort
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
Aggregates the top N boolean values per bucket.
This class collects by just keeping the count of true and false values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()voidcollect(boolean value, int bucket) Collects avalueinto abucket.intThe number of values to store per bucket.getOrder()The order of the sort.voidmerge(int groupId, BooleanBucketedSort other, int otherGroupId) Merge the values fromother'sotherGroupIdintogroupId.toBlock(BlockFactory blockFactory, IntVector selected) Creates a block with the values from theselectedgroups.
-
Constructor Details
-
BooleanBucketedSort
-
-
Method Details
-
collect
public void collect(boolean value, int bucket) Collects avalueinto abucket. -
getOrder
The order of the sort. -
getBucketSize
public int getBucketSize()The number of values to store per bucket. -
merge
Merge the values fromother'sotherGroupIdintogroupId. -
toBlock
Creates a block with the values from theselectedgroups. -
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-