Enum Class BucketHelpers.GapPolicy

java.lang.Object
java.lang.Enum<BucketHelpers.GapPolicy>
org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy
All Implemented Interfaces:
Serializable, Comparable<BucketHelpers.GapPolicy>, Constable, Writeable
Enclosing class:
BucketHelpers

public static enum BucketHelpers.GapPolicy extends Enum<BucketHelpers.GapPolicy> implements Writeable
A gap policy determines how "holes" in a set of buckets should be handled. For example, a date_histogram might have empty buckets due to no data existing for that time interval. This can cause problems for operations like a derivative, which relies on a continuous function. "insert_zeros": empty buckets will be filled with zeros for all metrics "skip": empty buckets will simply be ignored "keep_values": for empty buckets the values provided by the metrics will still be used if they are available
  • Enum Constant Details

  • Field Details

    • isSkippable

      public final boolean isSkippable
  • Method Details

    • values

      public static BucketHelpers.GapPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BucketHelpers.GapPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parse

      public static BucketHelpers.GapPolicy parse(String text, org.elasticsearch.common.xcontent.XContentLocation tokenLocation)
      Parse a string GapPolicy into the byte enum
      Parameters:
      text - GapPolicy in string format (e.g. "ignore")
      Returns:
      GapPolicy enum
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Serialize the GapPolicy to the output stream
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • readFrom

      public static BucketHelpers.GapPolicy readFrom(StreamInput in) throws IOException
      Deserialize the GapPolicy from the input stream
      Returns:
      GapPolicy Enum
      Throws:
      IOException
    • getName

      public String getName()
      Return the english-formatted name of the GapPolicy
      Returns:
      English representation of GapPolicy
    • processValue

      public abstract Double processValue(long docCount, Double value)