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

53,078

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"
]
Share:
53,078
Vidy Videni
Author by

Vidy Videni

Updated on March 14, 2020

Comments

  • Vidy Videni
    Vidy Videni about 4 years

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

    "name" => [
      "type" => "string",
      "analyzer" => "ik_max_word"
    ]
    
  • mmike
    mmike over 3 years
    Also if you have error with :uuid, than change 'string' to 'keyword'.