ES 按 userName 字段进行分组 统计
{
"query": {
"bool": {
"must": [
{
"range": {
"operateTime": {
"gt": "2020-05-18 00:00:00",
"lt": "2020-05-24 23:59:59"
}
}
},
{
"bool": {
"should": [
{
"match": {
"logType": "浏览"
}
},
{
"match": {
"logType": "回放"
}
}
]
}
}
]
}
},
"size": 0,
"aggs": {
"username_terms": {
"terms": {
"field": "userName",
"size": 100,
"order": {
"_count": "DESC"
}
}
}
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)