# ES聚合中的Metric聚合有哪些?如何理解?
如何理解?
- 从分类看:Metric聚合分析分为单值分析和多值分析两类
- 从功能看:根据具体的应用场景设计了一些分析api, 比如地理位置,百分数等等
- 单值分析: 只输出一个分析结果
- 标准stat型
avg
平均值max
最大值min
最小值sum
和value_count
数量
- 其它类型
cardinality
基数(distinct去重)weighted_avg
带权重的avgmedian_absolute_deviation
中位值
- 标准stat型
- 多值分析: 单值之外的
- stats型
stats
包含avg,max,min,sum和countmatrix_stats
针对矩阵模型extended_stats
string_stats
针对字符串
- 百分数型
percentiles
百分数范围percentile_ranks
百分数排行
- 地理位置型
geo_bounds
Geo boundsgeo_centroid
Geo-centroidgeo_line
Geo-Line
- Top型
top_hits
分桶后的top hitstop_metrics
- stats型
THE END
暂无评论内容