ES实现group by聚合查询
需求查询指定时间指定素材 失败的不同错误错误率请求GET /索引名/_search{"query": {"bool": {"filter": [{"bool": {"must": [{"term": {"make_date": "2022-01-09"}
·
需求
查询指定时间指定素材 失败的不同错误错误率
请求
GET /索引名/_search
{
"query": {
"bool": {
"filter": [
{
"bool": {
"must": [
{
"term": {
"make_date": "2022-01-09"
}
},
{
"term": {
"state": "2"
}
},
{
"term": {
"template_code": "0x01000000004015E0"
}
}
]
}
}
]
}
},
"from": 0,
"size": 0,
"sort": [],
"aggs": {
"group_by_key": {
"terms": {
"field": "engine_code"
}
}
}
}
结果
更多推荐
所有评论(0)