Force index template update

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?


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.

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

1 Like