aggregate
Run aggregation queries on Elasticsearch indices to compute statistics, counts, and groupings. Optionally filter documents before aggregating.
Instructions
Execute an aggregation query.
Args: index: Index to aggregate. aggs: Aggregation definition (e.g., {"status_count": {"terms": {"field": "status"}}}). query: Optional query to filter documents before aggregating.
Returns: Aggregation results with buckets and metrics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| aggs | Yes | ||
| query | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||