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>
- Enclosing class:
- BucketHelpers
public static enum BucketHelpers.GapPolicy extends java.lang.Enum<BucketHelpers.GapPolicy>
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSERT_ZEROS
SKIP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
INSERT_ZEROS
public static final BucketHelpers.GapPolicy INSERT_ZEROS
-
SKIP
public static final BucketHelpers.GapPolicy SKIP
-
-
Method Detail
-
values
public static BucketHelpers.GapPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BucketHelpers.GapPolicy c : BucketHelpers.GapPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BucketHelpers.GapPolicy valueOf(java.lang.String name)
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
public static BucketHelpers.GapPolicy parse(java.lang.String text, 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 java.io.IOException
Serialize the GapPolicy to the output stream- Throws:
java.io.IOException
-
readFrom
public static BucketHelpers.GapPolicy readFrom(StreamInput in) throws java.io.IOException
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
-
-