Elasticsearch python api获取索引统计信息

2024-10-01 04:53:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用pythonES client,我想查询关于索引的统计信息。更具体地说,我在寻找这个端点:

GET /_stats

有人知道如何使用文档中提到的IndicesClient类吗?在


Tags: 文档client信息getstats端点indicesclientpythones
1条回答
网友
1楼 · 发布于 2024-10-01 04:53:21

尝试:

from elasticsearch import Elasticsearch

es = Elasticsearch("localhost:9200")
es.indices.stats(index=<your_index_name>)

相关问题 更多 >