# Mapping changed cause exception after elasticsearch upgrade to 5.6.3

**URL:** <https://discuss.elastic.co/t/mapping-changed-cause-exception-after-elasticsearch-upgrade-to-5-6-3/155879>\
**Category:** Elasticsearch\
**Created:** [November 8, 2018, 12:26pm UTC](https://discuss.elastic.co/t/mapping-changed-cause-exception-after-elasticsearch-upgrade-to-5-6-3/155879 "2018-11-08T12:26:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)\
**Post date:** [November 8, 2018, 12:26pm UTC](https://discuss.elastic.co/t/mapping-changed-cause-exception-after-elasticsearch-upgrade-to-5-6-3/155879/1 "2018-11-08T12:26:46Z")

</div>

Hi

I have upgraded elasticsearch from 1.x to 5.6.3. Earlier I use to have a code like below

"instance.esClient.doIndexing(ESConstants.OFFLINE\_INDEX,id, new ESEventDoc());  
createMapping(dataFields); "

Here I created mapping after indexing which was working fine in 1.x. But same code is failing in 5.6.3 with below exception

rx.exceptions.OnErrorNotImplementedException: RemoteTransportException[[bLxpXLW][127.0.0.1:9300][indices:admin/mapping/put]]; nested: IllegalArgumentException[mapper [cache] cannot be changed from type [float] to [double]];

So I assume first indexing allot a datatype to fields. when I try to create mapping in next line its throwing cast error.

I need to create mapping manually, as I need to create left over fields. If I create mapping first and then do indexing , it is throwing index not found exception

How to handle this?

---

<div class="post-metadata">

**Author:** ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)\
**Post date:** [November 13, 2018, 8:42am UTC](https://discuss.elastic.co/t/mapping-changed-cause-exception-after-elasticsearch-upgrade-to-5-6-3/155879/2 "2018-11-13T08:42:42Z")

</div>

Any update?

---

<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:** [December 11, 2018, 8:42am UTC](https://discuss.elastic.co/t/mapping-changed-cause-exception-after-elasticsearch-upgrade-to-5-6-3/155879/3 "2018-12-11T08:42:43Z")

</div>

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