# How does the reindex api handle failure in specific documents?

**URL:** <https://discuss.elastic.co/t/how-does-the-reindex-api-handle-failure-in-specific-documents/358586>\
**Category:** Elasticsearch\
**Created:** [May 1, 2024, 7:38pm UTC](https://discuss.elastic.co/t/how-does-the-reindex-api-handle-failure-in-specific-documents/358586 "2024-05-01T19:38:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emma\_Vaiserfirov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emma_vaiserfirov/32/119704_2.png) [@Emma\_Vaiserfirov](https://discuss.elastic.co/u/Emma_Vaiserfirov)\
**Post date:** [May 1, 2024, 7:38pm UTC](https://discuss.elastic.co/t/how-does-the-reindex-api-handle-failure-in-specific-documents/358586/1 "2024-05-01T19:38:28Z")

</div>

We successfully completed a migration, but are missing a bunch of documents in a specific index. I think we know the cause, but I want to confirm.

In the old index, we had some old documents with a parameter that we did not include in the new index's mapping. This caused some `strict_dynamic_mapping_exception` errors. I have a plan for handling this issue in future migrations, but I want to make sure I understand what happened.

I use `reindex` within the DSL, and I know that following the error, it gets called again for other indices in the migration. What I don't know is - once there is one document in the specified index that throws this error, does that short-circuit the reindex for all remaining documents in that index?

I'm also wondering if there's a specific order to the way the documents are handled. The documents that could not be reindexed were old, but the way we identified the problem was by seeing that we were missing some of our newest documents. Does the reindex happen randomly?

Thanks!
