# Merge Document increasing some doc count why?

**URL:** <https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727>\
**Category:** Elasticsearch\
**Created:** [May 13, 2019, 4:21am UTC](https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727 "2019-05-13T04:21:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dilip\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_kumar/32/15459_2.png) [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)\
**Post date:** [May 13, 2019, 4:21am UTC](https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727/1 "2019-05-13T04:21:09Z")

</div>

Before merge my index status is

`green open client 4m5zLWWweSzzWsYoJ4MewpeQ 5 1 344914 79523 1.1gb 654.6mb`

when i did merge operation by curl -XPOST 192.168.1.101:9200/client/\_forcemerge?max\_num\_segments=1

I found some increment in documents

green open client 4m5zLWWweSzzWsYoJ4MewpeQ 5 1 345135 0 819.8mb 409.9mb

Why this document count increase 344914 to 345135 happened, is any chance to get include deleted documents? what actually merge did?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 13, 2019, 7:43am UTC](https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727/2 "2019-05-13T07:43:53Z")

</div>

Did you recently insert some documents into this index? It is possible that the `344914` document count didn't include documents added since the last [refresh](https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docs-refresh.html), but that a refresh occurred at around the same time as the force merge.

---

<div class="post-metadata">

**Author:** ![Dilip\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_kumar/32/15459_2.png) [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)\
**Post date:** [May 13, 2019, 8:48am UTC](https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727/3 "2019-05-13T08:48:57Z")

</div>

no there is no any insertion, is there any chance to no of doc will increase after forcemerge? there was 3 million small doc [among 4 billion doc] forcemerge taken 30 min.. can i reduce this time?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 14, 2019, 1:21am UTC](https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727/4 "2019-05-14T01:21:50Z")

</div>

> [@Dilip\_Kumar](#):
>
> is there any chance to no of doc will increase after forcemerge?

Not as far as I know.

> [@Dilip\_Kumar](#):
>
> forcemerge taken 30 min.. can i reduce this time?

Force-merging is an intensive operation that involves re-writing the whole index, so I'd expect it to take some time. Why do you want it to be faster?

---

<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:** [June 11, 2019, 1:21am UTC](https://discuss.elastic.co/t/merge-document-increasing-some-doc-count-why/180727/5 "2019-06-11T01:21:55Z")

</div>

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