Vidy Videni
Vidy Videni

Reputation: 1956

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

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

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

Upvotes: 132

Views: 62980

Answers (1)

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

Upvotes: 271

Related Questions