# Reindex from ES1.3.4 to ES 6.5.3 with same \_id gives error

**URL:** <https://discuss.elastic.co/t/reindex-from-es1-3-4-to-es-6-5-3-with-same-id-gives-error/164564>\
**Category:** Elasticsearch\
**Created:** [January 17, 2019, 2:40am UTC](https://discuss.elastic.co/t/reindex-from-es1-3-4-to-es-6-5-3-with-same-id-gives-error/164564 "2019-01-17T02:40:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anurupborah2001](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anurupborah2001](https://discuss.elastic.co/u/anurupborah2001)\
**Post date:** [January 17, 2019, 2:40am UTC](https://discuss.elastic.co/t/reindex-from-es1-3-4-to-es-6-5-3-with-same-id-gives-error/164564/1 "2019-01-17T02:40:05Z")

</div>

I am trying to reindex data using **\_reindex** API from Elastic Search 1.3.4. to Elastic Search 6.5.3. While in the Elastic Search 1.3.4 , two types(say T1, T2) have the same **\_id** field.When I try to reindex for the T1 on to Elastic Search 6.5.3 with index T1, it runs well as \_id field was not indexed before.When I try to reindex the T2 type from Elastic Search 1.3.4 on to Elastic Search 6.5.3 with index T2 , i am getting error as follows

> **_Rejecting mapping update to [T2] as the final mapping would have more than 1 type: [T1, T2]_**

Please kindly provide me a solution on how to reindex the same **\_id** on different index in Elastic Search 6.5.3.

Any solutions would be appreciated.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 17, 2019, 6:23am UTC](https://discuss.elastic.co/t/reindex-from-es1-3-4-to-es-6-5-3-with-same-id-gives-error/164564/2 "2019-01-17T06:23:33Z")

</div>

In Elasticsearch 6.x, each index can only have a single type, and it is this it complains about, not the \_id. If you have multiple types in your Elasticsearch 1.x index, you will need to make changes to the structure when you reindex. Have a look at [this blog post](https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch) for some background and additional information about this change.

---

<div class="post-metadata">

**Author:** ![anurupborah2001](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anurupborah2001](https://discuss.elastic.co/u/anurupborah2001)\
**Post date:** [January 17, 2019, 10:29am UTC](https://discuss.elastic.co/t/reindex-from-es1-3-4-to-es-6-5-3-with-same-id-gives-error/164564/4 "2019-01-17T10:29:16Z")

</div>

Thanks Christian. It was my mistake using same type in the reindex script.

---

<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:** [February 14, 2019, 10:29am UTC](https://discuss.elastic.co/t/reindex-from-es1-3-4-to-es-6-5-3-with-same-id-gives-error/164564/5 "2019-02-14T10:29:21Z")

</div>

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