Shards and documents information

Hi everyone,

I want to know how many documents in a shard.

For example, I was created the index with the default configuration. How many document of number 0 shard?

Similarly, how do I know which shard document?

Thanks.

curl -XGET 'http://localhost:9200/index_name/_stats?level=shards' will give you shard-level stats, including the number of documents per shard.

Indices Stats

As a side note, the plugin Kopf is excellent for viewing this sort of information. You should check it out.

1 Like

Thank you so much @Joshua_P

This information is very valuable to me.