# Losing documents while reindexing 4 million documents

**URL:** <https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855>\
**Category:** Elasticsearch\
**Created:** [November 6, 2019, 7:18pm UTC](https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855 "2019-11-06T19:18:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_kumar1/32/47867_2.png) [@Vikas\_Kumar1](https://discuss.elastic.co/u/Vikas_Kumar1)\
**Post date:** [November 6, 2019, 7:18pm UTC](https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855/1 "2019-11-06T19:18:43Z")

</div>

I am re-indexing 4 million documents. When I create a new index without any mappings (default mappings) it works fine. Means every document get indexed into the new one from source index.

But when I create new index with my new mappings where I added a char filter and copying some fields to a common field. I am loosing around 500000 documents. Please help

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 7, 2019, 9:06am UTC](https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855/2 "2019-11-07T09:06:39Z")

</div>

have you checked the tasks API to retrieve the status of the task for further information, or checked the reindex response? Just adding a char filter should not result in something like this, but maybe something else in your mapping has changed.

---

<div class="post-metadata">

**Author:** ![Vikas\_Kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_kumar1/32/47867_2.png) [@Vikas\_Kumar1](https://discuss.elastic.co/u/Vikas_Kumar1)\
**Post date:** [November 7, 2019, 9:22am UTC](https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855/3 "2019-11-07T09:22:03Z")

</div>

Thanks Alexander for your response. Yes I checked the reposne it do not give any error. I have total 4 million plus documents. But everytime it stops at the same count 3921999. And after that task just exit.  
Thing is when I map index with default mappings every document get indexed. But I changed added porter stem, added a field to which I am copying an another field, added synonyms. Its really strange for me. I am checking re-indexing status with task api. Could not see error. It takes around 20 min to index but in the last I do not a response what happened.

---

<div class="post-metadata">

**Author:** ![Vikas\_Kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_kumar1/32/47867_2.png) [@Vikas\_Kumar1](https://discuss.elastic.co/u/Vikas_Kumar1)\
**Post date:** [November 9, 2019, 4:04pm UTC](https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855/4 "2019-11-09T16:04:55Z")

</div>

I figured it out. Actually I was using keyword field for my description field which may contain some no alphabatic chars. I removed and it got fine.

---

<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:** [December 7, 2019, 4:05pm UTC](https://discuss.elastic.co/t/losing-documents-while-reindexing-4-million-documents/206855/5 "2019-12-07T16:05:02Z")

</div>

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