curl -X POST
http://localhost:9200/tdps%2A/log/_search
-H 'Cache-Control: no-cache'
-H 'Content-Type: application/json'
-H 'Postman-Token: ab63256e-5fac-4a96-9970-2b3020f37c2c'
-d '{
"query": {
"terms": {
"main_name": ["撞库攻击", "登录"]
}
},
"aggs": {
"group_by_url": {
"terms": {
"field": "net.http.url"
},
"aggs": {
"statustype": {
"terms": {
"script": {
"inline": "doc['''net.http.status'''].value + '''-''' + doc['''net.http.resp_content_length'''].value + doc['''net.http.resp_body'''].value"
},
"size": 1000
}
}
}
}
},
"_source": ["net.http.status", "net.http.resp_content_type", "net.http.url"]
}'
ES嵌套查询
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 说明本次redis集群安装在rhel6.8 64位机器上,redis版本为3.2.8,redis的gem文件版本为...