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
探讨了在Elasticsearch 6.3.1版本中,尝试在同一索引下创建多个类型时遇到的错误。文章详细解释了错误信息'Rejecting mapping update to [xxx] as the final mapping would have more than 1 type',并指出这是由于Elasticsearch 6.0版本开始限制一个索引下的类型数量,预计在7.0版本中将完全移除类型的概念。
3357

被折叠的 条评论
为什么被折叠?



