aggregate_simple
Perform simplified aggregation queries on Easysearch data to analyze field values using terms, averages, sums, minimums, maximums, cardinality, or statistical calculations.
Instructions
简化的聚合查询
参数:
index: 索引名称
field: 聚合字段
agg_type: 聚合类型 terms/avg/sum/min/max/cardinality/stats/extended_stats
size: 返回桶数量(仅 terms 有效)
示例:
aggregate_simple("orders", "status", "terms")
aggregate_simple("orders", "amount", "avg")
aggregate_simple("users", "email", "cardinality") # 去重计数
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| field | Yes | ||
| agg_type | No | terms | |
| size | No |