使用 man ascii 来查看 ASCII 表。

failed to execute bulk item

Elasticsearch | 作者 redhat | 发布于2018年08月09日 | 阅读数:6610

[2018-08-05 00:00:20,543][DEBUG][action.bulk              ] [node-10.10.10.38] [orderlog2018-08-05][19] failed to execute bulk item (index) index {orderlog2018-08-05][book][AWUFqvEY-IIX_f4px1s2], source[{"@version":"1","@timestamp":"2018-08-04T16:00:01.000Z5"}]}
java.lang.IllegalArgumentException: mapper [result] cannot be changed from type [long] to [string]
at org.elasticsearch.index.mapper.MappedFieldType.checkTypeName(MappedFieldType.java:238)
at org.elasticsearch.index.mapper.MappedFieldType.checkCompatibility(MappedFieldType.java:250)
at org.elasticsearch.index.mapper.core.NumberFieldMapper$NumberFieldType.checkCompatibility(NumberFieldMapper.java:146)
at org.elasticsearch.index.mapper.FieldTypeLookup.checkCompatibility(FieldTypeLookup.java:151)
at org.elasticsearch.index.mapper.FieldTypeLookup.copyAndAddAll(FieldTypeLookup.java:115)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:381)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:320)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:306)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230)
at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:468)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:772)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
使用的是template,每天动态生成index。在测试环境中,测试是正常的。
已邀请:

rochy - rochy_he

赞同来自:

根据报错提示:mapper [result] cannot be changed from type [long] to [string];来看应该是你字段映射类型不一致问题;
 
你可以对比测试环境的 template 和正式环境是否一致

要回复问题请先登录注册