Nested aggregation

Nested aggregation #

A single-bucket aggregation that scopes its sub-aggregations to a nested object path. Nested field values are addressable as dotted columns, so sub-aggregations read variants.color style fields directly.

reverse_nested (only valid inside a nested aggregation) jumps back out to the parent-document scope.

Example #

Products carry a variants array; aggregate one value per parent product inside the nested scope, then reverse back out:

Parameters for nested #

  • path
    (Required, string) Path of the nested object (dotted).
  • aggs
    (Optional, object) Sub-aggregations in nested scope.

Parameters for reverse_nested #

  • aggs
    (Optional, object) Sub-aggregations back in the parent scope.
Calendar September 26, 2026
Edit Edit this page