Class LongKeyedBucketOrds.FromMany
java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds
org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds.FromMany
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.elasticsearch.core.Releasable
- Enclosing class:
- LongKeyedBucketOrds
Implementation that works properly when collecting from many buckets.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionlong
add(long owningBucketOrd, long value)
Add theowningBucketOrd, value
pair.long
bucketsInOrd(long owningBucketOrd)
Count the buckets inowningBucketOrd
.void
close()
decribe()
Description used in profile results.long
find(long owningBucketOrd, long value)
Find theowningBucketOrd, value
pair.long
get(long ordinal)
Returns the value currently associated with the bucket ordinal.long
The maximum possible usedowningBucketOrd
.ordsEnum(long owningBucketOrd)
Build an iterator for buckets insideowningBucketOrd
in order of increasing ord.long
size()
The number of collected buckets.Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds
build, buildForValueRange
-
Constructor Details
-
FromMany
-
-
Method Details
-
add
public long add(long owningBucketOrd, long value)Description copied from class:LongKeyedBucketOrds
Add theowningBucketOrd, value
pair. Return the ord for their bucket if they have yet to be added, or-1-ord
if they were already present.- Specified by:
add
in classLongKeyedBucketOrds
-
find
public long find(long owningBucketOrd, long value)Description copied from class:LongKeyedBucketOrds
Find theowningBucketOrd, value
pair. Return the ord for their bucket if they have been added or-1
if they haven't.- Specified by:
find
in classLongKeyedBucketOrds
-
get
public long get(long ordinal)Description copied from class:LongKeyedBucketOrds
Returns the value currently associated with the bucket ordinal.- Specified by:
get
in classLongKeyedBucketOrds
-
bucketsInOrd
public long bucketsInOrd(long owningBucketOrd)Description copied from class:LongKeyedBucketOrds
Count the buckets inowningBucketOrd
.Some aggregations expect this to be fast but most wouldn't mind particularly if it weren't.
- Specified by:
bucketsInOrd
in classLongKeyedBucketOrds
-
size
public long size()Description copied from class:LongKeyedBucketOrds
The number of collected buckets.- Specified by:
size
in classLongKeyedBucketOrds
-
maxOwningBucketOrd
public long maxOwningBucketOrd()Description copied from class:LongKeyedBucketOrds
The maximum possible usedowningBucketOrd
.- Specified by:
maxOwningBucketOrd
in classLongKeyedBucketOrds
-
decribe
Description copied from class:LongKeyedBucketOrds
Description used in profile results.- Specified by:
decribe
in classLongKeyedBucketOrds
-
ordsEnum
Description copied from class:LongKeyedBucketOrds
Build an iterator for buckets insideowningBucketOrd
in 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:
ordsEnum
in classLongKeyedBucketOrds
-
close
public void close()
-