Elasticsearch _cluster/stats api vs _stats API

244 views Asked by At

I am a bit confused on why I would be getting a relatively drastic different amounts for each of this api calls for doc count (Primary and Total), shard amounts, and even the amount of indices.

Does anyone know why these two API calls would return different statistics for a given elasticsearch cluster?

Thanks

1

There are 1 answers

2
Sagar Patel On BEST ANSWER

GET _stats will show details only about the index which you have created, and it's not included statistics about hidden index or system index which start with dot(.).

GET _cluster/stats will show details for all the indices available in your cluster and it will include hidden / system index as well.