0
我想按功能路徑聚合訪問。ElasticSearch - 如何聚合訪問日誌忽略GET參數?
{
"query": {
"bool": {
"must": [
{
"wildcard": {
"path.keyword": "/hex/*"
}
}
]
}
},
"from": 0,
"size": 0,
"aggs": {
"path": {
"terms": {
"field": "path.keyword"
}
}
}
}
,我得到的結果類似這樣..
{
"key": "/hex/user/admin_user/auth",
"doc_count": 38
},
{
"key": "/hex/report/chart/fastreport_lobby_all?start_date=2017-06-29&end_date=2017-07-05&category=date_range&value[]=payoff",
"doc_count": 35
},
{
"key": "/hex/report/chart/fastreport_lobby_all?start_date=2017-06-29&end_date=2017-07-05&category=lobby&value[]=payoff",
"doc_count": 35
},
{
"key": "/hex/report/chart/online_membership?start_date=2017-06-29&end_date=2017-07-05&category=datetime_range&value[]=user_total",
"doc_count": 34
}
有兩個/六/報告/圖表/ fastreport_lobby_all?BALABALA ...結果。
這不是關於此功能的真正計數。
我有任何方法可以將這些統計爲一個嗎?
{
"key": "/hex/report/chart/fastreport_lobby_all",
"doc_count": 70
}