# Best way to re-index documents

**URL:** <https://discuss.elastic.co/t/best-way-to-re-index-documents/54654>\
**Category:** Elasticsearch\
**Created:** [July 4, 2016, 1:26pm UTC](https://discuss.elastic.co/t/best-way-to-re-index-documents/54654 "2016-07-04T13:26:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AjmiCh](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@AjmiCh](https://discuss.elastic.co/u/AjmiCh)\
**Post date:** [July 4, 2016, 1:26pm UTC](https://discuss.elastic.co/t/best-way-to-re-index-documents/54654/1 "2016-07-04T13:26:15Z")

</div>

Hi, i have a huge database Elastic search and my goal is to optimize and change the mapping of documents inside.

What's the best way to do the re-indexation ? and how i am sure that all documents are well index ?

I used logstash but it's not log the error when document not inserted

Best regards,  
Ajmi

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 4, 2016, 2:01pm UTC](https://discuss.elastic.co/t/best-way-to-re-index-documents/54654/2 "2016-07-04T14:01:09Z")

</div>

If you have elasticsearch 2.3 at least you can use the reindex API.

---

<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 5, 2017, 10:38pm UTC](https://discuss.elastic.co/t/best-way-to-re-index-documents/54654/3 "2017-07-05T22:38:31Z")

</div>


