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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Return the english-formatted name of the GapPolicystatic BucketHelpers.GapPolicy
Parse a string GapPolicy into the byte enumabstract Double
processValue(long docCount, Double value)
static BucketHelpers.GapPolicy
readFrom(StreamInput in)
Deserialize the GapPolicy from the input streamstatic BucketHelpers.GapPolicy
Returns the enum constant of this class with the specified name.static BucketHelpers.GapPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.void
writeTo(StreamOutput out)
Serialize the GapPolicy to the output stream
-
Enum Constant Details
-
INSERT_ZEROS
-
SKIP
-
KEEP_VALUES
-
-
Field Details
-
isSkippable
public final boolean isSkippable
-
-
Method Details
-
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
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 nameNullPointerException
- 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
Serialize the GapPolicy to the output stream- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
readFrom
Deserialize the GapPolicy from the input stream- Returns:
- GapPolicy Enum
- Throws:
IOException
-
getName
Return the english-formatted name of the GapPolicy- Returns:
- English representation of GapPolicy
-
processValue
-