Module org.elasticsearch.server
Class CardinalityUpperBound
java.lang.Object
org.elasticsearch.search.aggregations.CardinalityUpperBound
Upper bound of how many
owningBucketOrds that an Aggregator
will have to collect into.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CardinalityUpperBoundAggregators with this cardinality may be collected many times.static final CardinalityUpperBoundAggregators with this cardinality won't collect any data at all.static final CardinalityUpperBoundAggregators with this cardinality will collect be collected once or zero times. -
Method Summary
Modifier and TypeMethodDescriptionabstract <R> Rmap(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.
-
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
Map the cardinality to a value. The argument to themapperis the estimated cardinality, orInteger.MAX_VALUEif the cardinality is unknown.
-