Class LongKeyedBucketOrds.FromManySmall
java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds
org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds.FromManySmall
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.elasticsearch.common.lease.Releasable
- Enclosing class:
- LongKeyedBucketOrds
public static class LongKeyedBucketOrds.FromManySmall extends LongKeyedBucketOrds
Implementation that packs the
owningbucketOrd into the top
bits of a long and uses the bottom bits for the value.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds
LongKeyedBucketOrds.BucketOrdsEnum, LongKeyedBucketOrds.FromMany, LongKeyedBucketOrds.FromManySmall, LongKeyedBucketOrds.FromSingle -
Constructor Summary
Constructors Constructor Description FromManySmall(BigArrays bigArrays, int owningBucketOrdShift) -
Method Summary
Modifier and Type Method Description longadd(long owningBucketOrd, long value)Add theowningBucketOrd, valuepair.longbucketsInOrd(long owningBucketOrd)Count the buckets inowningBucketOrd.voidclose()java.lang.Stringdecribe()Description used in profile results.longfind(long owningBucketOrd, long value)Find theowningBucketOrd, valuepair.longget(long ordinal)Returns the value currently associated with the bucket ordinal.longmaxOwningBucketOrd()The maximum possible usedowningBucketOrd.LongKeyedBucketOrds.BucketOrdsEnumordsEnum(long owningBucketOrd)Build an iterator for buckets insideowningBucketOrdin order of increasing ord.longsize()The number of collected buckets.Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds
build, buildForValueRangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FromManySmall
-
-
Method Details
-
add
public long add(long owningBucketOrd, long value)Description copied from class:LongKeyedBucketOrdsAdd theowningBucketOrd, valuepair. Return the ord for their bucket if they have yet to be added, or-1-ordif they were already present.- Specified by:
addin classLongKeyedBucketOrds
-
find
public long find(long owningBucketOrd, long value)Description copied from class:LongKeyedBucketOrdsFind theowningBucketOrd, valuepair. Return the ord for their bucket if they have been added or-1if they haven't.- Specified by:
findin classLongKeyedBucketOrds
-
get
public long get(long ordinal)Description copied from class:LongKeyedBucketOrdsReturns the value currently associated with the bucket ordinal.- Specified by:
getin classLongKeyedBucketOrds
-
bucketsInOrd
public long bucketsInOrd(long owningBucketOrd)Description copied from class:LongKeyedBucketOrdsCount the buckets inowningBucketOrd.Some aggregations expect this to be fast but most wouldn't mind particularly if it weren't.
- Specified by:
bucketsInOrdin classLongKeyedBucketOrds
-
size
public long size()Description copied from class:LongKeyedBucketOrdsThe number of collected buckets.- Specified by:
sizein classLongKeyedBucketOrds
-
maxOwningBucketOrd
public long maxOwningBucketOrd()Description copied from class:LongKeyedBucketOrdsThe maximum possible usedowningBucketOrd.- Specified by:
maxOwningBucketOrdin classLongKeyedBucketOrds
-
decribe
public java.lang.String decribe()Description copied from class:LongKeyedBucketOrdsDescription used in profile results.- Specified by:
decribein classLongKeyedBucketOrds
-
ordsEnum
Description copied from class:LongKeyedBucketOrdsBuild an iterator for buckets insideowningBucketOrdin order of increasing ord.When this is first returns it is "unpositioned" and you must call
LongKeyedBucketOrds.BucketOrdsEnum.next()to move it to the first value.- Specified by:
ordsEnumin classLongKeyedBucketOrds
-
close
public void close()
-