• ElasticSearch6.5.0 【Rejecting mapping update to [posts] as the final mapping would have more than 1 type】


    今天想在一个Index上增加一个type,结果报错

    java.lang.IllegalArgumentException: Rejecting mapping update to [posts] as the final mapping would have more than 1 type: [doc, IT]
        at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:451) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:399) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:331) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:313) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:229) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:639) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:268) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:198) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:133) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:244) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:207) ~[elasticsearch-6.5.0.jar:6.5.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]

    查看官方才发现6.X不支持一个index多个type了

    在6.0.0或者更高版本中仅支持单Mapping。对于5.X版本中多个Mapping依旧可以使用。计划在7.0.0中完全移除Mapping【移除是符合情理的,你看现在就只支持单Mapping,跟直接访问index没啥区别了】

     https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

  • 相关阅读:
    http_build_query(array) 中文乱码问题
    蒙层
    git删除本地和线上分支
    小程序Storage记录用户身份
    PHPExcel Allowed memory size of 内存泄漏解决办法
    抽奖帮助类
    linux查询并删除文件
    微信公众号H5,分享朋友,分享朋友圈处理
    mysql备份数据方式
    shell监控文件变化
  • 原文地址:https://www.cnblogs.com/LUA123/p/10037336.html
Copyright © 2020-2023  润新知