All Implemented Interfaces:
AggregationVariant, PivotGroupByVariant, JsonpSerializable

@JsonpDeserializable public class TermsAggregation extends BucketAggregationBase implements AggregationVariant, PivotGroupByVariant
See Also:
  • Field Details

  • Method Details

    • of

    • _aggregationKind

      public Aggregation.Kind _aggregationKind()
      Aggregation variant kind.
      Specified by:
      _aggregationKind in interface AggregationVariant
    • _pivotGroupByKind

      public PivotGroupBy.Kind _pivotGroupByKind()
      PivotGroupBy variant kind.
      Specified by:
      _pivotGroupByKind in interface PivotGroupByVariant
    • collectMode

      @Nullable public final TermsAggregationCollectMode collectMode()
      Determines how child aggregations should be calculated: breadth-first or depth-first.

      API name: collect_mode

    • exclude

      @Nullable public final TermsExclude exclude()
      Values to exclude. Accepts regular expressions and partitions.

      API name: exclude

    • executionHint

      @Nullable public final TermsAggregationExecutionHint executionHint()
      Determines whether the aggregation will use field values directly or global ordinals.

      API name: execution_hint

    • field

      @Nullable public final String field()
      The field from which to return terms.

      API name: field

    • include

      @Nullable public final TermsInclude include()
      Values to include. Accepts regular expressions and partitions.

      API name: include

    • minDocCount

      @Nullable public final Integer minDocCount()
      Only return values that are found in more than min_doc_count hits.

      API name: min_doc_count

    • missing

      @Nullable public final FieldValue missing()
      The value to apply to documents that do not have a value. By default, documents without a value are ignored.

      API name: missing

    • missingOrder

      @Nullable public final MissingOrder missingOrder()
      API name: missing_order
    • missingBucket

      @Nullable public final Boolean missingBucket()
      API name: missing_bucket
    • valueType

      @Nullable public final String valueType()
      Coerced unmapped fields into the specified type.

      API name: value_type

    • order

      public final List<NamedValue<SortOrder>> order()
      Specifies the sort order of the buckets. Defaults to sorting by descending document count.

      API name: order

    • script

      @Nullable public final Script script()
      API name: script
    • shardSize

      @Nullable public final Integer shardSize()
      The number of candidate terms produced by each shard. By default, shard_size will be automatically estimated based on the number of shards and the size parameter.

      API name: shard_size

    • showTermDocCountError

      @Nullable public final Boolean showTermDocCountError()
      Set to true to return the doc_count_error_upper_bound, which is an upper bound to the error on the doc_count returned by each shard.

      API name: show_term_doc_count_error

    • size

      @Nullable public final Integer size()
      The number of buckets returned out of the overall terms list.

      API name: size

    • format

      @Nullable public final String format()
      API name: format
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Overrides:
      serializeInternal in class AggregationBase
    • setupTermsAggregationDeserializer

      protected static void setupTermsAggregationDeserializer(ObjectDeserializer<TermsAggregation.Builder> op)