Mapping changed cause exception after elasticsearch upgrade to 5.6.3

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?

Any update?

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