Class BytesKeyedBucketOrds
java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.BytesKeyedBucketOrds
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
public abstract class BytesKeyedBucketOrds
extends Object
implements org.elasticsearch.core.Releasable
Maps
BytesRef bucket keys to bucket ordinals.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn iterator for buckets inside a particularowningBucketOrd. -
Method Summary
Modifier and TypeMethodDescriptionabstract longadd(long owningBucketOrd, org.apache.lucene.util.BytesRef value)Add theowningBucketOrd, valuepair.abstract longbucketsInOrd(long owningBucketOrd)Count the buckets inowningBucketOrd.static BytesKeyedBucketOrdsbuild(BigArrays bigArrays, CardinalityUpperBound cardinality)Build aLongKeyedBucketOrds.abstract BytesKeyedBucketOrds.BucketOrdsEnumordsEnum(long owningBucketOrd)Build an iterator for buckets insideowningBucketOrdin order of increasing ord.abstract longsize()The number of collected buckets.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
build
Build aLongKeyedBucketOrds. -
add
public abstract long add(long owningBucketOrd, org.apache.lucene.util.BytesRef value)Add theowningBucketOrd, valuepair. Return the ord for their bucket if they have yet to be added, or-1-ordif they were already present. -
bucketsInOrd
public abstract long bucketsInOrd(long owningBucketOrd)Count the buckets inowningBucketOrd. -
size
public abstract long size()The number of collected buckets. -
ordsEnum
Build an iterator for buckets insideowningBucketOrdin order of increasing ord.When this is first returns it is "unpositioned" and you must call
BytesKeyedBucketOrds.BucketOrdsEnum.next()to move it to the first value.
-