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 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退