(1)输入
curl -H "Content-Type:application/json" -XGET http://127.0.0.1:9200/es_ir_push_record/_search -d
'{
"from": 0,
"size": 0,
"aggs": {
"group_by_key": {
"date_histogram": {
"field": "push_time",
"calendar_interval": "day"
}
}
}
}'
(2)输出
{
"took": 97,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 10000,
"relation": "gte"
},
"max_score": null,
"hits": []
},
"aggregations": {
"group_by_key": {
"buckets": [
{
"key_as_string": "20240308000000",
"key": 1709856000000,
"doc_count": 8191
},
{
"key_as_string": "20240309000000",
"key": 1709942400000,
"doc_count": 15303
},
{
"key_as_string": "20240310000000",
"key": 1710028800000,
"doc_count": 14220
},
{
"key_as_string": "20240311000000",
"key": 1710115200000,
"doc_count": 9479
}
]
}
}
}
9122

被折叠的 条评论
为什么被折叠?



