Enum BucketHelpers.GapPolicy
java.lang.Object
java.lang.Enum<BucketHelpers.GapPolicy>
org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BucketHelpers.GapPolicy>
,java.lang.constant.Constable
,Writeable
- Enclosing class:
- BucketHelpers
public static enum BucketHelpers.GapPolicy extends java.lang.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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Enum Constant Summary
Enum Constants Enum Constant Description INSERT_ZEROS
SKIP
-
Method Summary
Modifier and Type Method Description java.lang.String
getName()
Return the english-formatted name of the GapPolicystatic BucketHelpers.GapPolicy
parse(java.lang.String text, XContentLocation tokenLocation)
Parse a string GapPolicy into the byte enumstatic BucketHelpers.GapPolicy
readFrom(StreamInput in)
Deserialize the GapPolicy from the input streamstatic BucketHelpers.GapPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BucketHelpers.GapPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
writeTo(StreamOutput out)
Serialize the GapPolicy to the output stream
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
parse
Parse a string GapPolicy into the byte enum- Parameters:
text
- GapPolicy in string format (e.g. "ignore")- Returns:
- GapPolicy enum
-
writeTo
Serialize the GapPolicy to the output stream -
readFrom
Deserialize the GapPolicy from the input stream- Returns:
- GapPolicy Enum
- Throws:
java.io.IOException
-
getName
public java.lang.String getName()Return the english-formatted name of the GapPolicy- Returns:
- English representation of GapPolicy
-