---
type: api
title: Aggregation result
url: https://www.elastic.co/docs/api/doc/elasticsearch/types/_types-aggregations-aggregate
resource: https://www.elastic.co/docs/api/doc/elasticsearch/types/_types-aggregations-aggregate
products:
  - Elasticsearch
---

# Aggregation result

`map string to Aggregation result`

This type represents a dictionary mapping string keys to `Aggregation result` values.

[Read the reference documentation](https://www.elastic.co/docs/explore-analyze/query-filter/aggregations)

## Union types (oneOf)

This type can be one of the following:

- **CardinalityAggregate**
  - `meta` (object)
  - `value` (number)
- **HdrPercentilesAggregate**
  - `meta` (object)
  - `values` (union oneOf)
    - **KeyedPercentiles**
    - **[]ArrayPercentilesItem**
      - `key` (number)
      - `value` (union number | string) — nullable
      - `value_as_string` (string)
- **HdrPercentileRanksAggregate**
  - `meta` (object)
  - `values` (union oneOf)
    - **KeyedPercentiles**
    - **[]ArrayPercentilesItem**
      - `key` (number)
      - `value` (union number | string) — nullable
      - `value_as_string` (string)
- **TDigestPercentilesAggregate**
  - `meta` (object)
  - `values` (union oneOf)
    - **KeyedPercentiles**
    - **[]ArrayPercentilesItem**
      - `key` (number)
      - `value` (union number | string) — nullable
      - `value_as_string` (string)
- **TDigestPercentileRanksAggregate**
  - `meta` (object)
  - `values` (union oneOf)
    - **KeyedPercentiles**
    - **[]ArrayPercentilesItem**
      - `key` (number)
      - `value` (union number | string) — nullable
      - `value_as_string` (string)
- **PercentilesBucketAggregate**
  - `meta` (object)
  - `values` (union oneOf)
    - **KeyedPercentiles**
    - **[]ArrayPercentilesItem**
      - `key` (number)
      - `value` (union number | string) — nullable
      - `value_as_string` (string)
- **MedianAbsoluteDeviationAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **MinAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **MaxAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **SumAggregate**
  Sum aggregation result. `value` is always present and is zero if there were no values to process.
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **AvgAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **WeightedAvgAggregate**
  Weighted average aggregation result. `value` is missing if the weight was set to zero.
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **ValueCountAggregate**
  Value count aggregation result. `value` is always present.
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **SimpleValueAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
- **DerivativeAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
  - `normalized_value` (number)
  - `normalized_value_as_string` (string)
- **BucketMetricValueAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
    The metric value. A missing value generally means that there was no data to aggregate,
unless specified otherwise.
  - `value_as_string` (string)
  - `keys` (string[])
- **ChangePointAggregate**
  - `meta` (object)
  - `type` (object)
    - `dip` (object)
      - `p_value` (number)
      - `change_point` (number)
    - `distribution_change` (object)
      - `p_value` (number)
      - `change_point` (number)
    - `indeterminable` (object)
      - `reason` (string)
    - `non_stationary` (object)
      - `p_value` (number)
      - `r_value` (number)
      - `trend` (string)
    - `spike` (object)
      - `p_value` (number)
      - `change_point` (number)
    - `stationary` (object)
    - `step_change` (object)
      - `p_value` (number)
      - `change_point` (number)
    - `trend_change` (object)
      - `p_value` (number)
      - `r_value` (number)
      - `change_point` (number)
  - `bucket` (object)
    - `doc_count` (number)
    - `key` (union oneOf)
      One of: `number` or `string` or `boolean`
- **StatsAggregate**
  Statistics aggregation result. `min`, `max` and `avg` are missing if there were no values to process
(`count` is zero).
  - `meta` (object)
  - `count` (number)
  - `min` (union number | string) — nullable
  - `max` (union number | string) — nullable
  - `avg` (union number | string) — nullable
  - `sum` (number)
  - `min_as_string` (string)
  - `max_as_string` (string)
  - `avg_as_string` (string)
  - `sum_as_string` (string)
- **StatsBucketAggregate**
  - `meta` (object)
  - `count` (number)
  - `min` (union number | string) — nullable
  - `max` (union number | string) — nullable
  - `avg` (union number | string) — nullable
  - `sum` (number)
  - `min_as_string` (string)
  - `max_as_string` (string)
  - `avg_as_string` (string)
  - `sum_as_string` (string)
- **ExtendedStatsAggregate**
  - `meta` (object)
  - `count` (number)
  - `min` (union number | string) — nullable
  - `max` (union number | string) — nullable
  - `avg` (union number | string) — nullable
  - `sum` (number)
  - `min_as_string` (string)
  - `max_as_string` (string)
  - `avg_as_string` (string)
  - `sum_as_string` (string)
  - `sum_of_squares` (union number | string) — nullable
  - `variance` (union number | string) — nullable
  - `variance_population` (union number | string) — nullable
  - `variance_sampling` (union number | string) — nullable
  - `std_deviation` (union number | string) — nullable
  - `std_deviation_population` (union number | string) — nullable
  - `std_deviation_sampling` (union number | string) — nullable
  - `std_deviation_bounds` (object)
    - `upper` (union number | string) — nullable
    - `lower` (union number | string) — nullable
    - `upper_population` (union number | string) — nullable
    - `lower_population` (union number | string) — nullable
    - `upper_sampling` (union number | string) — nullable
    - `lower_sampling` (union number | string) — nullable
  - `sum_of_squares_as_string` (string)
  - `variance_as_string` (string)
  - `variance_population_as_string` (string)
  - `variance_sampling_as_string` (string)
  - `std_deviation_as_string` (string)
  - `std_deviation_bounds_as_string` (object)
    - `upper` (string)
    - `lower` (string)
    - `upper_population` (string)
    - `lower_population` (string)
    - `upper_sampling` (string)
    - `lower_sampling` (string)
- **ExtendedStatsBucketAggregate**
  - `meta` (object)
  - `count` (number)
  - `min` (union number | string) — nullable
  - `max` (union number | string) — nullable
  - `avg` (union number | string) — nullable
  - `sum` (number)
  - `min_as_string` (string)
  - `max_as_string` (string)
  - `avg_as_string` (string)
  - `sum_as_string` (string)
  - `sum_of_squares` (union number | string) — nullable
  - `variance` (union number | string) — nullable
  - `variance_population` (union number | string) — nullable
  - `variance_sampling` (union number | string) — nullable
  - `std_deviation` (union number | string) — nullable
  - `std_deviation_population` (union number | string) — nullable
  - `std_deviation_sampling` (union number | string) — nullable
  - `std_deviation_bounds` (object)
    - `upper` (union number | string) — nullable
    - `lower` (union number | string) — nullable
    - `upper_population` (union number | string) — nullable
    - `lower_population` (union number | string) — nullable
    - `upper_sampling` (union number | string) — nullable
    - `lower_sampling` (union number | string) — nullable
  - `sum_of_squares_as_string` (string)
  - `variance_as_string` (string)
  - `variance_population_as_string` (string)
  - `variance_sampling_as_string` (string)
  - `std_deviation_as_string` (string)
  - `std_deviation_bounds_as_string` (object)
    - `upper` (string)
    - `lower` (string)
    - `upper_population` (string)
    - `lower_population` (string)
    - `upper_sampling` (string)
    - `lower_sampling` (string)
- **CartesianBoundsAggregate**
  - `meta` (object)
  - `bounds` (object)
    - `top_left` (union oneOf)
      - **LatLonGeoLocation**
        - `lat` (number)
          Latitude
        - `lon` (number)
          Longitude
      - **GeoHashLocation**
        - `geohash` (string)
      - **[]number**
      - **string**
    - `bottom_right` (union oneOf)
      - **LatLonGeoLocation**
        - `lat` (number)
          Latitude
        - `lon` (number)
          Longitude
      - **GeoHashLocation**
        - `geohash` (string)
      - **[]number**
      - **string**
- **CartesianCentroidAggregate**
  - `meta` (object)
  - `count` (number)
  - `location` (object)
    - `x` (number)
    - `y` (number)
- **GeoBoundsAggregate**
  - `meta` (object)
  - `bounds` (union oneOf)
    - **CoordsGeoBounds**
      - `top` (number)
      - `bottom` (number)
      - `left` (number)
      - `right` (number)
    - **TopLeftBottomRightGeoBounds**
      - `top_left` (union oneOf)
        - **LatLonGeoLocation**
          - `lat` (number)
            Latitude
          - `lon` (number)
            Longitude
        - **GeoHashLocation**
          - `geohash` (string)
        - **[]number**
        - **string**
      - `bottom_right` (union oneOf)
        - **LatLonGeoLocation**
          - `lat` (number)
            Latitude
          - `lon` (number)
            Longitude
        - **GeoHashLocation**
          - `geohash` (string)
        - **[]number**
        - **string**
    - **TopRightBottomLeftGeoBounds**
      - `top_right` (union oneOf)
        - **LatLonGeoLocation**
          - `lat` (number)
            Latitude
          - `lon` (number)
            Longitude
        - **GeoHashLocation**
          - `geohash` (string)
        - **[]number**
        - **string**
      - `bottom_left` (union oneOf)
        - **LatLonGeoLocation**
          - `lat` (number)
            Latitude
          - `lon` (number)
            Longitude
        - **GeoHashLocation**
          - `geohash` (string)
        - **[]number**
        - **string**
    - **WktGeoBounds**
      - `wkt` (string)
- **GeoCentroidAggregate**
  - `meta` (object)
  - `count` (number)
  - `location` (union oneOf)
    - **LatLonGeoLocation**
      - `lat` (number)
        Latitude
      - `lon` (number)
        Longitude
    - **GeoHashLocation**
      - `geohash` (string)
    - **[]number**
    - **string**
- **HistogramAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to HistogramBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key_as_string` (string)
        - `key` (number)
    - **[]HistogramBucket**
      - `doc_count` (number)
      - `key_as_string` (string)
      - `key` (number)
- **DateHistogramAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to DateHistogramBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key_as_string` (string)
        - `key` (number)
    - **[]DateHistogramBucket**
      - `doc_count` (number)
      - `key_as_string` (string)
      - `key` (number)
- **AutoDateHistogramAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to DateHistogramBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key_as_string` (string)
        - `key` (number)
    - **[]DateHistogramBucket**
      - `doc_count` (number)
      - `key_as_string` (string)
      - `key` (number)
  - `interval` (string)
- **VariableWidthHistogramAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to VariableWidthHistogramBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `min` (number)
        - `key` (number)
        - `max` (number)
        - `min_as_string` (string)
        - `key_as_string` (string)
        - `max_as_string` (string)
    - **[]VariableWidthHistogramBucket**
      - `doc_count` (number)
      - `min` (number)
      - `key` (number)
      - `max` (number)
      - `min_as_string` (string)
      - `key_as_string` (string)
      - `max_as_string` (string)
- **StringTermsAggregate**
  Result of a `terms` aggregation when the field is a string.
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to StringTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `doc_count_error_upper_bound` (number)
        - `key` (union oneOf)
          One of: `number` or `string` or `boolean`
    - **[]StringTermsBucket**
      - `doc_count` (number)
      - `doc_count_error_upper_bound` (number)
      - `key` (union oneOf)
        One of: `number` or `string` or `boolean`
  - `doc_count_error_upper_bound` (number)
  - `sum_other_doc_count` (number)
- **LongTermsAggregate**
  Result of a `terms` aggregation when the field is some kind of whole number like a integer, long, or a date.
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to LongTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `doc_count_error_upper_bound` (number)
        - `key` (number)
        - `key_as_string` (string)
    - **[]LongTermsBucket**
      - `doc_count` (number)
      - `doc_count_error_upper_bound` (number)
      - `key` (number)
      - `key_as_string` (string)
  - `doc_count_error_upper_bound` (number)
  - `sum_other_doc_count` (number)
- **DoubleTermsAggregate**
  Result of a `terms` aggregation when the field is some kind of decimal number like a float, double, or distance.
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to DoubleTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `doc_count_error_upper_bound` (number)
        - `key` (number)
        - `key_as_string` (string)
    - **[]DoubleTermsBucket**
      - `doc_count` (number)
      - `doc_count_error_upper_bound` (number)
      - `key` (number)
      - `key_as_string` (string)
  - `doc_count_error_upper_bound` (number)
  - `sum_other_doc_count` (number)
- **UnmappedTermsAggregate**
  Result of a `terms` aggregation when the field is unmapped. `buckets` is always empty.
  - `meta` (object)
  - `buckets` (union oneOf)
    One of: `object[]` or `string to object`
  - `doc_count_error_upper_bound` (number)
  - `sum_other_doc_count` (number)
- **LongRareTermsAggregate**
  Result of the `rare_terms` aggregation when the field is some kind of whole number like a integer, long, or a date.
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to LongRareTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (number)
        - `key_as_string` (string)
    - **[]LongRareTermsBucket**
      - `doc_count` (number)
      - `key` (number)
      - `key_as_string` (string)
- **StringRareTermsAggregate**
  Result of the `rare_terms` aggregation when the field is a string.
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to StringRareTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
    - **[]StringRareTermsBucket**
      - `doc_count` (number)
      - `key` (string)
- **UnmappedRareTermsAggregate**
  Result of a `rare_terms` aggregation when the field is unmapped. `buckets` is always empty.
  - `meta` (object)
  - `buckets` (union oneOf)
    One of: `object[]` or `string to object`
- **MultiTermsAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to MultiTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (union oneOf[])
          One of: `number` or `string` or `boolean`
        - `key_as_string` (string)
        - `doc_count_error_upper_bound` (number)
    - **[]MultiTermsBucket**
      - `doc_count` (number)
      - `key` (union oneOf[])
        One of: `number` or `string` or `boolean`
      - `key_as_string` (string)
      - `doc_count_error_upper_bound` (number)
  - `doc_count_error_upper_bound` (number)
  - `sum_other_doc_count` (number)
- **MissingAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **NestedAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **ReverseNestedAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **GlobalAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **FilterAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **ChildrenAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **ParentAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **SamplerAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **UnmappedSamplerAggregate**
  - `meta` (object)
  - `doc_count` (number)
- **GeoHashGridAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to GeoHashGridBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
    - **[]GeoHashGridBucket**
      - `doc_count` (number)
      - `key` (string)
- **GeoTileGridAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to GeoTileGridBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
    - **[]GeoTileGridBucket**
      - `doc_count` (number)
      - `key` (string)
- **GeoHexGridAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to GeoHexGridBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
    - **[]GeoHexGridBucket**
      - `doc_count` (number)
      - `key` (string)
- **RangeAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to RangeBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `from` (number)
        - `to` (number)
        - `from_as_string` (string)
        - `to_as_string` (string)
        - `key` (string)
          The bucket key. Present if the aggregation is _not_ keyed
    - **[]RangeBucket**
      - `doc_count` (number)
      - `from` (number)
      - `to` (number)
      - `from_as_string` (string)
      - `to_as_string` (string)
      - `key` (string)
        The bucket key. Present if the aggregation is _not_ keyed
- **DateRangeAggregate**
  Result of a `date_range` aggregation. Same format as a for a `range` aggregation: `from` and `to`
in `buckets` are milliseconds since the Epoch, represented as a floating point number.
  - `meta` (object)
  - `buckets` (union oneOf)
    Same options as `buckets` in `RangeAggregate`
- **GeoDistanceAggregate**
  Result of a `geo_distance` aggregation. The unit for `from` and `to` is meters by default.
  - `meta` (object)
  - `buckets` (union oneOf)
    Same options as `buckets` in `RangeAggregate`
- **IpRangeAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to IpRangeBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
        - `from` (string)
        - `to` (string)
    - **[]IpRangeBucket**
      - `doc_count` (number)
      - `key` (string)
      - `from` (string)
      - `to` (string)
- **IpPrefixAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to IpPrefixBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `is_ipv6` (boolean)
        - `key` (string)
        - `prefix_length` (number)
        - `netmask` (string)
    - **[]IpPrefixBucket**
      - `doc_count` (number)
      - `is_ipv6` (boolean)
      - `key` (string)
      - `prefix_length` (number)
      - `netmask` (string)
- **FiltersAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to FiltersBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
    - **[]FiltersBucket**
      - `doc_count` (number)
      - `key` (string)
- **AdjacencyMatrixAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to AdjacencyMatrixBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (string)
    - **[]AdjacencyMatrixBucket**
      - `doc_count` (number)
      - `key` (string)
- **SignificantLongTermsAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to SignificantLongTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `score` (number)
        - `bg_count` (number)
        - `key` (number)
        - `key_as_string` (string)
    - **[]SignificantLongTermsBucket**
      - `doc_count` (number)
      - `score` (number)
      - `bg_count` (number)
      - `key` (number)
      - `key_as_string` (string)
  - `bg_count` (number)
  - `doc_count` (number)
- **SignificantStringTermsAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to SignificantStringTermsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `score` (number)
        - `bg_count` (number)
        - `key` (string)
    - **[]SignificantStringTermsBucket**
      - `doc_count` (number)
      - `score` (number)
      - `bg_count` (number)
      - `key` (string)
  - `bg_count` (number)
  - `doc_count` (number)
- **UnmappedSignificantTermsAggregate**
  Result of the `significant_terms` aggregation on an unmapped field. `buckets` is always empty.
  - `meta` (object)
  - `buckets` (union oneOf)
    One of: `object[]` or `string to object`
  - `bg_count` (number)
  - `doc_count` (number)
- **CompositeAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to CompositeBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (object)
    - **[]CompositeBucket**
      - `doc_count` (number)
      - `key` (object)
  - `after_key` (object)
- **FrequentItemSetsAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to FrequentItemSetsBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (map string to string)
        - `support` (number)
    - **[]FrequentItemSetsBucket**
      - `doc_count` (number)
      - `key` (map string to string)
      - `support` (number)
- **TimeSeriesAggregate**
  - `meta` (object)
  - `buckets` (union oneOf)
    - **string to TimeSeriesBucket**
      - `<string>` (object)
        - `doc_count` (number)
        - `key` (map string to oneOf)
    - **[]TimeSeriesBucket**
      - `doc_count` (number)
      - `key` (map string to oneOf)
- **ScriptedMetricAggregate**
  - `meta` (object)
  - `value` (object)
- **TopHitsAggregate**
  - `meta` (object)
  - `hits` (object)
    - `total` (union oneOf)
      Total hit count information, present only if `track_total_hits` wasn't `false` in the search request.
      - **TotalHits**
        - `relation` (enum)
          

Supported values include:
  - `eq`: Accurate
  - `gte`: Lower bound, including returned events or sequences
          Values: `eq`, `gte`
        - `value` (number)
      - **number**
    - `hits` (object[])
      - `_index` (string)
      - `_id` (string)
      - `_score` (union number | string) — nullable
      - `_explanation` (object)
        - `description` (string)
        - `details` (object[])
          - `description` (string)
          - `details` (object[]) — recursive
            Same fields as `details` in `_explanation`
          - `value` (number)
        - `value` (number)
      - `fields` (map string to object)
      - `highlight` (map string to string)
      - `inner_hits` (map string to object)
        Map values (object)
        - `hits` (object) — recursive
          Same fields as `hits` in `TopHitsAggregate`
      - `matched_queries` (union oneOf)
        One of: `string[]` or `string to number`
      - `_nested` (object)
        - `field` (string)
        - `offset` (number)
        - `_nested` (object) — recursive
          Same fields as `_nested` in `hits`
      - `_ignored` (string[])
      - `ignored_field_values` (map string to object)
      - `_shard` (string)
      - `_node` (string)
      - `_routing` (string)
      - `_source` (object)
      - `_rank` (number)
      - `_seq_no` (number)
      - `_primary_term` (number)
      - `_version` (number)
      - `sort` (union[])
    - `max_score` (union number | string) — nullable
- **InferenceAggregate**
  - `meta` (object)
  - `value` (union oneOf)
    One of: `number` or `string` or `boolean`
  - `feature_importance` (object[])
    - `feature_name` (string)
    - `importance` (number)
    - `classes` (object[])
      - `class_name` (string)
      - `importance` (number)
  - `top_classes` (object[])
    - `class_name` (union oneOf)
      One of: `number` or `string` or `boolean`
    - `class_probability` (number)
    - `class_score` (number)
  - `warning` (string)
- **StringStatsAggregate**
  - `meta` (object)
  - `count` (number)
  - `min_length` (union number | string) — nullable
  - `max_length` (union number | string) — nullable
  - `avg_length` (union number | string) — nullable
  - `entropy` (union number | string) — nullable
  - `distribution` (union oneOf) — nullable
    One of: `string to number` or `string`
  - `min_length_as_string` (string)
  - `max_length_as_string` (string)
  - `avg_length_as_string` (string)
- **BoxPlotAggregate**
  - `meta` (object)
  - `min` (number)
  - `max` (number)
  - `q1` (number)
  - `q2` (number)
  - `q3` (number)
  - `lower` (number)
  - `upper` (number)
  - `min_as_string` (string)
  - `max_as_string` (string)
  - `q1_as_string` (string)
  - `q2_as_string` (string)
  - `q3_as_string` (string)
  - `lower_as_string` (string)
  - `upper_as_string` (string)
- **TopMetricsAggregate**
  - `meta` (object)
  - `top` (object[])
    - `sort` (union oneOf[])
      One of: `union` or `string`
    - `metrics` (map string to oneOf)
- **TTestAggregate**
  - `meta` (object)
  - `value` (union number | string) — nullable
  - `value_as_string` (string)
- **RateAggregate**
  - `meta` (object)
  - `value` (number)
  - `value_as_string` (string)
- **CumulativeCardinalityAggregate**
  Result of the `cumulative_cardinality` aggregation
  - `meta` (object)
  - `value` (number)
  - `value_as_string` (string)
- **MatrixStatsAggregate**
  - `meta` (object)
  - `doc_count` (number)
  - `fields` (object[])
    - `name` (string)
    - `count` (number)
    - `mean` (number)
    - `variance` (number)
    - `skewness` (number)
    - `kurtosis` (number)
    - `covariance` (map string to number)
    - `correlation` (map string to number)
- **GeoLineAggregate**
  - `meta` (object)
  - `type` (string)
  - `geometry` (object)
    - `type` (string)
      Always `"LineString"`
    - `coordinates` (number[])
      Array of `[lon, lat]` coordinates
  - `properties` (object)

