Evhz
Evhz

Reputation: 9248

Elasticsearch python api GET index stats

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?

Upvotes: 4

Views: 5639

Answers (1)

Lupanoide
Lupanoide

Reputation: 3212

Try:

from elasticsearch import Elasticsearch

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

Upvotes: 12

Related Questions