Skip to main content
 首页 » 编程设计

python之Elasticsearch python api GET 索引统计

2025年05月04日24oomusou

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

GET /_stats 

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

请您参考如下方法:

尝试:

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