java.lang.IllegalArgumentException: Mapper for [hits] conflicts with existing mapping in other types: [mapper [hits] cannot be changed from type [long] to [int]]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by abcfy2
, 1 year ago
Mapper for [hits] conflicts with existing mapping in other types: [mapper [hits] cannot be changed from type [long] to [int]]
via GitHub by abcfy2
, 1 year ago
Mapper for [hits] conflicts with existing mapping in other types: [mapper [hits] cannot be changed from type [long] to [int]]
via GitHub by dadoonet
, 1 year ago
Mapper for [version] conflicts with existing mapping in other types: [mapper [version] cannot be changed from type [long] to [int]]
via GitHub by Drewshg312
, 2 years ago
Mapper for [version] conflicts with existing mapping in other types: [mapper [version] cannot be changed from type [long] to [int]]
via GitHub by ninjada
, 2 years ago
Mapper for [timestamp] conflicts with existing mapping in other types: [mapper [timestamp] cannot be changed from type [date] to [string]]
via GitHub by rborer
, 2 years ago
Mapper for [_index] conflicts with existing mapping in other types: [mapper [_index] cannot be changed from type [_index] to [string]]
java.lang.IllegalArgumentException: Mapper for [hits] conflicts with existing mapping in other types: [mapper [hits] cannot be changed from type [long] to [int]]
at org.elasticsearch.index.mapper.FieldTypeLookup.checkCompatibility(FieldTypeLookup.java:117)
at org.elasticsearch.index.mapper.MapperService.checkNewMappersCompatibility(MapperService.java:364)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:315)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:261)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$2.execute(MetaDataMappingService.java:444)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:388)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.