4

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
  • 2
    You are looking for stats method? You can do es.indices.stats(...), Where es is your Elasticsearch object. Commented Nov 5, 2018 at 15:34

1 Answer 1

12

Try:

from elasticsearch import Elasticsearch

es = Elasticsearch("localhost:9200")
es.indices.stats(index=<your_index_name>)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.