Count documents in a index

Hello Guru's,

i want to know how many indices are present and how many documents are present in each index.(not including nested documents)

also need to know if there is any indexing going on this index(like index refresh or new documents being loaded)

_stats is giving me more count.and dont know how to give query using count api

curl -XGET 'http://localhost:9200/_aliases?pretty' --> this is giving a list of indices this was easy till this part but want doc-count and status as i described above

HI,

I think you check like this

GET x3,sports/_count - can get document count for index

GET _cat/indices?v - list all the indices with document count and other info, see sample

health status index pri rep docs.count docs.deleted store.size pri.store.size
yellow open ptest 5 1 2 0 80.9kb 80.9kb
yellow open sports 5 1 22 0 31.5kb 31.5kb
yellow open test 5 1 1 0 3.9kb 3.9kb

Regards
M