V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xinyana
V2EX  ›  问与答

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

  •  
  •   xinyana · 2020-09-13 19:08:55 +08:00 · 613 次点击
    这是一个创建于 1292 天前的主题,其中的信息可能已经有所发展或是发生改变。

    elasticsearch7.9.1,ik 分词也是 7.9.1

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

    求解,非常感谢!

    #1.创建 index
    PUT /news
    
    #2.设置分词
    PUT /news/_mapping
    {
      "properties": {
        "content": {
          "type": "text",
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        }
      }
    }
    
    #3.插入数据
    PUT gd/gd/1iNC
    {
      "title": "这里是标题",
      "content": "这里是内容"
    }
    
    DELETE /news
    

    第三步插入数据报错:

    {
      "error" : {
        "root_cause" : [
          {
            "type" : "illegal_argument_exception",
            "reason" : "Mapper for [content] conflicts with existing mapping:\n[mapper [content] has different [analyzer]]"
          }
        ],
        "type" : "illegal_argument_exception",
        "reason" : "Mapper for [content] conflicts with existing mapping:\n[mapper [content] has different [analyzer]]"
      },
      "status" : 400
    }
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1140 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:33 · PVG 02:33 · LAX 11:33 · JFK 14:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.