私は、spring-data-elasticsearchを使用しています。2.1.4.RELEASE、ElasticsearchOperationsを使用してタイプのフィールドマッピングを更新するにはどうすればよいですか?spring-data-elasticsearchを使用して、フィールドマッピングを更新するにはどうすればよいですか?
私はoperations.putMapping(EsJob.class)を試してみます。再度、例外はあります: フィールドcreatedByは既に存在していますが、更新したいからです。 誰かがこれに対してより良い解決策を持っていますか?
Servlet.service() for servlet [dispatcher] in context with path [/api] threw exception [Request processing failed; nested exception is java.lang.IllegalgumentException: Mapper for [createdBy] conflicts with existing mapping in other types:
[mapper [createdBy] has different [store] values, mapper [createdBy] has different [analyzer]]] with root cause
java.lang.IllegalArgumentException: Mapper for [createdBy] conflicts with existing mapping in other types:
[mapper [createdBy] has different [store] values, mapper [createdBy] has different [analyzer]]
at org.elasticsearch.index.mapper.FieldTypeLookup.checkCompatibility(FieldTypeLookup.java:153)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)