世界都没见过
谈什么世界观

ElasticSearch7.9.1, ik 分词无法插入数据

zhuban大佬:
elasticsearch7.9.1,ik 分词也是 7.9.1

前两步没有问题,但是插入数据报错 报错:Mapper 冲突

求解,非常感谢!

  1. #1.创建 index
  2. PUT /news
  3. #2.设置分词
  4. PUT /news/_mapping
  5. {
  6.   "properties": {
  7.     "content": {
  8.       "type": "text",
  9.       "analyzer": "ik_max_word",
  10.       "search_analyzer": "ik_max_word"
  11.     }
  12.   }
  13. }
  14. #3.插入数据
  15. PUT gd/gd/1iNC
  16. {
  17.   "title": "这里是标题",
  18.   "content": "这里是内容"
  19. }
  20. DELETE /news

第三步插入数据报错:

  1. {
  2.   "error" : {
  3.     "root_cause" : [
  4.       {
  5.         "type" : "illegal_argument_exception",
  6.         "reason" : "Mapper for [content] conflicts with existing mapping:\n[mapper [content] has different [analyzer]]"
  7.       }
  8.     ],
  9.     "type" : "illegal_argument_exception",
  10.     "reason" : "Mapper for [content] conflicts with existing mapping:\n[mapper [content] has different [analyzer]]"
  11.   },
  12.   "status" : 400
  13. }
赞(0) 打赏
未经允许不得转载:VPS排行榜 » ElasticSearch7.9.1, ik 分词无法插入数据

相关推荐

  • 暂无文章

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏