Class CardinalityUpperBound
java.lang.Object
org.elasticsearch.search.aggregations.CardinalityUpperBound
public abstract class CardinalityUpperBound
extends java.lang.Object
Upper bound of how many
owningBucketOrds that an Aggregator
will have to collect into.-
Field Summary
Fields Modifier and Type Field Description static CardinalityUpperBoundMANYAggregators with this cardinality may be collected many times.static CardinalityUpperBoundNONEAggregators with this cardinality won't collect any data at all.static CardinalityUpperBoundONEAggregators with this cardinality will collect be collected once or zero times. -
Method Summary
Modifier and Type Method Description abstract <R> Rmap(java.util.function.IntFunction<R> mapper)Map the cardinality to a value.abstract CardinalityUpperBoundmultiply(int bucketCount)Get the rough measure of the number of buckets a fixed-bucketAggregatorwill collect.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
NONE
Aggregators with this cardinality won't collect any data at all. For the most part this happens when an aggregation is inside of aBucketsAggregatorthat is pointing to an unmapped field. -
ONE
Aggregators with this cardinality will collect be collected once or zero times. This will only be true for top level Aggregators and for sub-aggregator's who's ancestors are all single-bucket aggregations likeFilterAggregatoror aRangeAggregatorconfigured to collect only a single range. -
MANY
Aggregators with this cardinality may be collected many times. Most sub-aggregators ofBucketsAggregators will have this cardinality.
-
-
Method Details
-
multiply
Get the rough measure of the number of buckets a fixed-bucketAggregatorwill collect.- Parameters:
bucketCount- the number of buckets that thisAggregatorwill collect per owning ordinal
-
map
public abstract <R> R map(java.util.function.IntFunction<R> mapper)Map the cardinality to a value. The argument to themapperis the estimated cardinality, orInteger.MAX_VALUEif the cardinality is unknown.
-