Elasticsearch Python API GET索引统计信息

Evh*_*vhz 1 python python-3.x elasticsearch

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

GET /_stats
Run Code Online (Sandbox Code Playgroud)

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

Lup*_*ide 5

尝试:

from elasticsearch import Elasticsearch

es = Elasticsearch("localhost:9200")
es.indices.stats(index=<your_index_name>)
Run Code Online (Sandbox Code Playgroud)