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

Vidy Videni picture Vidy Videni · Nov 23, 2017 · Viewed 46.2k times · Source

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

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

Answer

Aryeetey Solomon Aryeetey picture Aryeetey Solomon Aryeetey · Nov 23, 2017

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"
]