Enum Class AggregationOrderE

java.lang.Object
java.lang.Enum<AggregationOrderE>
de.elo.ix.client.esearch.aggregations.AggregationOrderE
All Implemented Interfaces:
Serializable, Comparable<AggregationOrderE>, Constable

public enum AggregationOrderE extends Enum<AggregationOrderE> implements Serializable
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.
Since:
21.03.000.001
  • Enum Constant Details

    • DEFAULT

      public static final AggregationOrderE DEFAULT
      This value denotes that the default should be used which is different for each aggregation type.
      Since:
      21.03.000.004
    • COUNT_DESC

      public static final AggregationOrderE COUNT_DESC
      Document count descending. This is the default for terms aggregations.
    • KEY_DESC

      public static final AggregationOrderE KEY_DESC
      Bucket key value descending.
    • KEY_ASC

      public static final AggregationOrderE KEY_ASC
      Bucket key value ascending. This is the default for histogram and date_histogram aggregations.
  • Method Details

    • values

      public static AggregationOrderE[] 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 AggregationOrderE 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