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 CardinalityUpperBound MANY
    Aggregators with this cardinality may be collected many times.
    static CardinalityUpperBound NONE
    Aggregators with this cardinality won't collect any data at all.
    static CardinalityUpperBound ONE
    Aggregators with this cardinality will collect be collected once or zero times.
  • Method Summary

    Modifier and Type Method Description
    abstract <R> R map​(java.util.function.IntFunction<R> mapper)
    Map the cardinality to a value.
    abstract CardinalityUpperBound multiply​(int bucketCount)
    Get the rough measure of the number of buckets a fixed-bucket Aggregator will collect.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • multiply

      public abstract CardinalityUpperBound multiply​(int bucketCount)
      Get the rough measure of the number of buckets a fixed-bucket Aggregator will collect.
      Parameters:
      bucketCount - the number of buckets that this Aggregator will 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 the mapper is the estimated cardinality, or Integer.MAX_VALUE if the cardinality is unknown.