# Reindex API doesnt use the templates for destination index

**URL:** <https://discuss.elastic.co/t/reindex-api-doesnt-use-the-templates-for-destination-index/64938>\
**Category:** Elasticsearch\
**Created:** [November 3, 2016, 7:12pm UTC](https://discuss.elastic.co/t/reindex-api-doesnt-use-the-templates-for-destination-index/64938 "2016-11-03T19:12:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PradeepBadiger](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@PradeepBadiger](https://discuss.elastic.co/u/PradeepBadiger)\
**Post date:** [November 3, 2016, 7:12pm UTC](https://discuss.elastic.co/t/reindex-api-doesnt-use-the-templates-for-destination-index/64938/1 "2016-11-03T19:12:09Z")

</div>

Hi,

I am trying to use the reindex API and use a template for the destination index that will setup the mapping for the destination index as the reindex API doesnt copy the settings of the source index to the destination index. But i see that the destination index doesnt even use the template for its mapping. I verified the pattern used in the template and it does fit the index that would get created as part of the reindex. I have enabled the auto index creation.

Is this a known issue?

thanks,  
Pradeep V.B.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 3, 2016, 7:30pm UTC](https://discuss.elastic.co/t/reindex-api-doesnt-use-the-templates-for-destination-index/64938/2 "2016-11-03T19:30:15Z")

</div>

> [@PradeepBadiger](#):
>
> Is this a known issue?

I've never seen it before. Can you recreate it with curl against a clean cluster?

---

<div class="post-metadata">

**Author:** ![PradeepBadiger](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@PradeepBadiger](https://discuss.elastic.co/u/PradeepBadiger)\
**Post date:** [November 3, 2016, 9:25pm UTC](https://discuss.elastic.co/t/reindex-api-doesnt-use-the-templates-for-destination-index/64938/3 "2016-11-03T21:25:19Z")

</div>

I had a typo in the index pattern used within the template.

thanks,  
Pradeep V.B.

---

<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:06pm UTC](https://discuss.elastic.co/t/reindex-api-doesnt-use-the-templates-for-destination-index/64938/4 "2017-07-05T22:06:45Z")

</div>


