Elasticsearch python api GET index stats

Viewed 3054

I'm using python ES client and I would like to query stats about indexes. More concretely, I'm looking for this endpoint:

GET /_stats

Does anyone know how to use the IndicesClient class mentioned in the docs?

1 Answers

Try:

from elasticsearch import Elasticsearch

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