# Reindex API and slightly different document counts

**URL:** <https://discuss.elastic.co/t/reindex-api-and-slightly-different-document-counts/283852>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [September 10, 2021, 8:58am UTC](https://discuss.elastic.co/t/reindex-api-and-slightly-different-document-counts/283852 "2021-09-10T08:58:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattG1](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@MattG1](https://discuss.elastic.co/u/MattG1)\
**Post date:** [September 10, 2021, 8:58am UTC](https://discuss.elastic.co/t/reindex-api-and-slightly-different-document-counts/283852/1 "2021-09-10T08:58:06Z")

</div>

Hello,

I have recently created a new index via the `reindex API`. I am now running both indexes at the same time and indexing/deleting documents to both. I have noticed that the document counts between the two indexes are off slightly (basically between 0 and 300). The difference in item counts between the two indexes varies over time and can become bigger/smaller.

To calculate the difference between the two I've been using the `cat count api` and the indexes in question have ~3.4m items.

Is this to be expected? I feel like everything is okay and that there's some kind of background processes that causes the counts to be off slightly.

Thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 10, 2021, 11:00pm UTC](https://discuss.elastic.co/t/reindex-api-and-slightly-different-document-counts/283852/2 "2021-09-10T23:00:48Z")

</div>

> [@MattG1](#):
>
> I am now running both indexes at the same time and indexing/deleting documents to both.

I am not sure what this means .. running both at the same time

My understanding is.. reindex is not replication

I would read [this](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) closely.

> Just like \_update\_by\_query, \_reindex gets a snapshot of the source but its destination must be different so version conflicts are unlikely.

So if you are changing the source while reindexing ... I would expect some inconsistency between the source / destination after the reindexing is complete.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 8, 2021, 11:01pm UTC](https://discuss.elastic.co/t/reindex-api-and-slightly-different-document-counts/283852/3 "2021-10-08T23:01:43Z")

</div>

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