sort rule search result by created default

This commit is contained in:
liugq 2022-06-05 18:42:29 +08:00
parent 7b26184469
commit 57e2c3b435
1 changed files with 7 additions and 0 deletions

View File

@ -414,6 +414,13 @@ func (alertAPI *AlertAPI) searchRule(w http.ResponseWriter, req *http.Request, p
})
}
queryDSL := util.MapStr{
"sort": []util.MapStr{
{
"created": util.MapStr{
"order": "desc",
},
},
},
"from": from,
"size": size,
"query": util.MapStr{