# Force index template update

**URL:** <https://discuss.elastic.co/t/force-index-template-update/52507>\
**Category:** Elasticsearch\
**Created:** [June 11, 2016, 4:36pm UTC](https://discuss.elastic.co/t/force-index-template-update/52507 "2016-06-11T16:36:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alecswan](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alecswan](https://discuss.elastic.co/u/alecswan)\
**Post date:** [June 11, 2016, 4:36pm UTC](https://discuss.elastic.co/t/force-index-template-update/52507/1 "2016-06-11T16:36:24Z")

</div>

Hi there,

I have an index template which maps "hostip" to "type": "ip". Unfortunately, data was sent to ES before the template was applied. So, ES decided that the type of "hostip" is LongFieldType. Once the template was applied ES started flooding log files with "Mixing up field types: class org.elasticsearch.index.mapper.core.LongFieldMapper$LongFieldType != class org.elasticsearch.index.mapper.ip.IpFieldMapper$IpFieldType on field hostip" errors.

I deleted all indexes after applying the template, but ES still logs the errors. I think ES somehow "remembered" that "hostip" is LongFieldType and refuses to use the type from the template.

How can I instruct ES to "forget" the old mapping of "hostip"? Is there some sort of type mapping cache I can clear?

Thanks,  
Alec

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 13, 2016, 1:39am UTC](https://discuss.elastic.co/t/force-index-template-update/52507/2 "2016-06-13T01:39:03Z")

</div>

If it is still reporting this then you need to check other templates and mappings, there must be something causing this conflict.

But there is no concept of a cached mapping, only an applied one.

---

<div class="post-metadata">

**Author:** ![alecswan](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alecswan](https://discuss.elastic.co/u/alecswan)\
**Post date:** [June 13, 2016, 2:31am UTC](https://discuss.elastic.co/t/force-index-template-update/52507/3 "2016-06-13T02:31:38Z")

</div>

Thanks, Mark, I found an offending mapping that caused the problem.

---

<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:44pm UTC](https://discuss.elastic.co/t/force-index-template-update/52507/4 "2017-07-05T22:44:27Z")

</div>


