Bucket sort aggregation

Bucket sort aggregation #

A parent pipeline aggregation sorting (and paginating) the bucket list by any of the bucket’s metrics — the pipeline counterpart of the request-level sort.

Parameters for bucket_sort #

  • sort
    (Optional, array) Sort clauses over the bucket’s metrics ([{ "revenue": { "order": "desc" } }]).
  • from
    (Optional, integer) Skip this many buckets — pagination offset.
  • size
    (Optional, integer) Keep at most this many buckets.
  • gap_policy
    (Optional, string) skip (default) or insert_zeros.
Calendar September 27, 2026
Edit Edit this page