Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 510
Evhz Avatar asked Sep 19 '25 15:09

Evhz


1 Answers

Try:

from elasticsearch import Elasticsearch

es = Elasticsearch("localhost:9200")
es.indices.stats(index=<your_index_name>)
like image 134
Lupanoide Avatar answered Sep 22 '25 07:09

Lupanoide