# Elastisearch 7: reindex api deleting document after copy

**URL:** https://discuss.elastic.co/t/elastisearch-7-reindex-api-deleting-document-after-copy/188151
**Category:** Elasticsearch
**Created:** [June 29, 2019, 6:28pm UTC](https://discuss.elastic.co/t/elastisearch-7-reindex-api-deleting-document-after-copy/188151 "2019-06-29T18:28:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Deb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deb/32/46162_2.png) [@Deb](https://discuss.elastic.co/u/Deb)
#### Post date: [June 29, 2019, 6:28pm UTC](https://discuss.elastic.co/t/elastisearch-7-reindex-api-deleting-document-after-copy/188151/1 "2019-06-29T18:28:22Z")

</div>

I've gone through the [\_reindex](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) api documentation a few times, and can't figure out if it's possible or not. Once the document is copied from the source index to the destination index, is it possible to also remove the source document so that I can reduce some disk space overhead during reindexing?

---

<div class="post-metadata">

### Author: ![Juanma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juanma/32/49076_2.png) [@Juanma](https://discuss.elastic.co/u/Juanma)
#### Post date: [June 30, 2019, 2:45pm UTC](https://discuss.elastic.co/t/elastisearch-7-reindex-api-deleting-document-after-copy/188151/2 "2019-06-30T14:45:23Z")

</div>

Hello @Deb

According to documentation [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) that's not possible.

It wouldn't make so much sense because internally when you delete a documment it doesn't free the space until a \_forcemerge is done [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html) and the segments are merged expunging the deletes.

In theory you shouldn't have issues with storage space if you are not over the watermark 85% by default.

I hope this helps 🙂

---

<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: [July 28, 2019, 2:45pm UTC](https://discuss.elastic.co/t/elastisearch-7-reindex-api-deleting-document-after-copy/188151/3 "2019-07-28T14:45:28Z")

</div>

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