暂无图片
分享
scott
2021-02-22
ES关于文档更新报错

在学习ES的CRUD时,更新文档遇到mapping的相关报错,求解答。

curl -XPUT http://192.168.1.19:9200/cm_index_3/_doc/2?pretty -H 'Content-Type:application/json' -d '{
   "name" : "cm_index_3",
   "birth" : "2002.01.01",
   "text" : "hi,cm"
}' 

更新文档,报错:
curl -XPOST http://192.168.1.19:9200/zto_index_3/2/_update?pretty -H 'Content-Type:application/json' -d '{
   "name" : "cm_index_3",
   "birth" : "2002.02.02",
   "text" : "hi,cm"
}' 

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Rejecting mapping update to [cm_index_3] as the final mapping would have more than 1 type: [_doc, 2]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Rejecting mapping update to [cm_index_3] as the final mapping would have more than 1 type: [_doc, 2]"
  },
  "status" : 400
}

收藏
分享
1条回答
默认
最新
scott
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏