I have a cluster with 5 nodes and an index created on a daily basis. Alias pointing to all the indices for read
Ex:-
Index 1 = foo_2016-05-03t00:00:00-07:00
Index 2 = foo_2016-05-02t00:00:00-07:00
Alias foo , has both the indices
Now a GET to foo/_count is giving us 3122518 documents ( = sum of documents in index 1 & index 2)
However a get to localhost:9200/_stats/docs,store yields a result of 5801911 ( from _all.primaries.docs.count field)
I think _count gives you the total indexed documents per index. If each indexed document has sub-document(s) then the total document count is higher than the actual number of indexed document.
For example, if you do _cat/indices and look at the number in the docs.count column for each index. The go to each index and do _count, some will be different. The one that is different is because each indexed document has one or more sub-document(s)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.