No handler for type [string] declared on field [name]

后端 未结 1 428
温柔的废话
温柔的废话 2021-02-03 16:40

When type is declared as string, Elasticsearch 6.0 will show this error.

\"name\" => [
  \"type\" => \"string\",
  \"analyzer\" =         


        
1条回答
  •  执笔经年
    2021-02-03 17:06

    Elasticsearch has dropped the string type and is now using text. So your code should be something like this

    "name" => [
      "type" => "text",
      "analyzer" => "ik_max_word"
    ]
    

    0 讨论(0)
提交回复
热议问题