Doc count match

Hey ,
Can anynone tell me why there is difference between result of doc count API for match all and document count displayed in cat/indices result for a particular index .
Or these doc counts are totally different because in my case doc count has vary large difference .
count API for match all gives -> 6087276
cat/indices for that index gives -> 33720620

1 Like

Hi @Animesh_singh
I checked it on my indices, and i get the same results with count API(match all) and _cat/indices.
Maybe it is better to understand if we can see the query and response in here.

If you are updating your documents you also need to consider the number of deleted documents reported by the _cat/indices API.

1 Like

ok , i got that , but one more thing if i reindex to different index and then check _cat/aliases gives same total number of docs but deleted becomes zero . So can i say that record of total number of documents are transferred to new index but not the number of deleted ones .
index1- _cat/alias => total docs ->33720620 deleted docs -> 21324423 , Match_all - 60k someting
reindexed all data of index1 to index 2 -
index2- _cat/alias => total docs ->33720620 deleted docs -> 5343, Math_all - same as above

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.