A慧眼如炬 2019-12-26 16:18 采纳率: 0%
浏览 2425

关于elasticsearch的添加数据

elasticsearch7.2.0版本,在kibnan操作的
执行如下操作就会报错
PUT myindex/_doc/18
{
"name": "pipeline",
"dat3":"测试",
"msg": "123",
"ab":{
"content":{
"c":"564654123"
}
},
"newFile2":{
"name":{
"id":"564654123"
}
},
"newFile1":"111"
}```

报错信息
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse field [newFile2] of type [text] in document with id '18'"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [newFile2] of type [text] in document with id '18'",
"caused_by": {
"type": "illegal_state_exception",
"reason": "Can't get text on a START_OBJECT at 10:14"
}
},
"status": 400
}

但是吧newFile2变成newFile3,newFile1变成newFile5就正常添加了,没有问题
PUT myindex/_doc/18
{
  "name": "pipeline",
  "dat3":"测试",
  "msg": "123",
  "ab":{
    "content":{
      "c":"564654123"
    }
  },
  "newFile3":{
    "name":{
      "id":"564654123"
    }
  },
  "newFile5":"111"
}
有人知道是什么原因吗
  • 写回答

1条回答

  • 关注
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置