码迷,mamicode.com
首页 > 移动开发 > 详细

Rejecting mapping update to [xxx] as the final mapping would have more than 1 type: [xxx, xx]

时间:2019-04-11 16:13:49      阅读:1181      评论:0      收藏:0      [点我收藏+]

标签:nal   col   reject   接下来   roo   final   style   date   lis   

说明:

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

Rejecting mapping update to [xxx] as the final mapping would have more than 1 type: [xxx, xx]

标签:nal   col   reject   接下来   roo   final   style   date   lis   

原文地址:https://www.cnblogs.com/yfb918/p/10690103.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!