Enum Class AggregationOrderE
- All Implemented Interfaces:
Serializable
,Comparable<AggregationOrderE>
,Constable
Sort options for ElasticSearch.
By default, the terms aggregation orders terms by descending document _count. The date_histogram aggregation, however, sorts buckets by default by their key ascending.
Use the order parameter to specify a different sort order.
We do not offer some sort order types if it is not guaranteed to produce reasonable results. E.g. Due to the way the terms aggregation gets terms from shards, sorting by ascending doc count often produces inaccurate results.
By default, the terms aggregation orders terms by descending document _count. The date_histogram aggregation, however, sorts buckets by default by their key ascending.
Use the order parameter to specify a different sort order.
We do not offer some sort order types if it is not guaranteed to produce reasonable results. E.g. Due to the way the terms aggregation gets terms from shards, sorting by ascending doc count often produces inaccurate results.
- Since:
- 21.03.000.001
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDocument count descending.This value denotes that the default should be used which is different for each aggregation type.Bucket key value ascending.Bucket key value descending. -
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationOrderE
Returns the enum constant of this class with the specified name.static AggregationOrderE[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
This value denotes that the default should be used which is different for each aggregation type.- Since:
- 21.03.000.004
-
COUNT_DESC
Document count descending. This is the default for terms aggregations. -
KEY_DESC
Bucket key value descending. -
KEY_ASC
Bucket key value ascending. This is the default for histogram and date_histogram aggregations.
-
-
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
-