Geo_bounds

Geo bounds aggregation

/ Geo_bounds, / Aggregation

Geo bounds aggregation #

A metrics aggregation computing the bounding box (top-left / bottom-right corners) of all geo_point values — the rectangle that just contains every point in the bucket.

How it works #

The engine scans the bucket’s geo_point column, tracks the minimum and maximum latitude and longitude, and emits:

{
  "bounds": {
    "top_left":     { "lat": <max lat>, "lon": <min lon> },
    "bottom_right": { "lat": <min lat>, "lon": <max lon> }
  }
}

null when the bucket holds no parseable point. The column-store fast path and the executor path run the same min/max scan.

...