ElasticSearch之cat count API

发布时间 2023-11-23 22:12:51作者: jackieathome

读取当前存储的记录的数量。
命令样例如下:

curl -X GET "https://localhost:9200/_cat/count?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"

执行结果输出如下:

epoch      timestamp count
1700748409 14:06:49  0

查看帮助,命令如下:

curl -X GET "https://localhost:9200/_cat/count?v=true&help=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"

执行结果输出如下:

epoch     | t,time                  | seconds since 1970-01-01 00:00:00
timestamp | ts,hms,hhmmss           | time in HH:MM:SS
count     | dc,docs.count,docsCount | the document count

相关资料