'Why there are 20 documents diff (cat vs count)?

I try to compare results of count and cat for the amount of documents and I'm getting different results:

GET /my_index/_count gives:

{
  "count": 4020199,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  }
}

And GET /_cat/indices gives:

green open my_index 53IuNvZ1T4W_8u1U4bf7kb 1 1 8040418 0 27gb 13.5gb

When we compare the quantities we get that:

8040418 - 4020199 * 2 (one replica) = 20

Note: I used refresh command and there is no change.

So where are that 20 loss documents ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source