Rejecting mapping update to [xxx] as the final mapping would have more than 1 type: [xxx, xx]
说明:
1、elasticsearch 版本 6.3.1
2、在同一个index下创建两个type时报错,信息如下:
在创建第二个type:solr时,先前已经在相同索引下创建了一个type:es
[root@master ~]# curl -H "Content-Type: application/json" -XPOST 'localhost:9200/books/solr/1?pretty' -d '{"title":"Apache Solr 4 Cookbook", > "published": 2012}' { "error" : { "root_cause" : [ { "type" : "illegal_argument_exception", "reason" : "Rejecting mapping update to [books] as the final mapping would have more than 1 type: [solr, es]" } ], "type" : "illegal_argument_exception", "reason" : "Rejecting mapping update to [books] as the final mapping would have more than 1 type: [solr, es]" }, "status" : 400 }
3、原因
是由于6.0的版本不允许一个index下面有多个type,并且官方说是在接下来的7.0版本中会删掉type
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步