117
votes

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

"name" => [
  "type" => "string",
  "analyzer" => "ik_max_word"
]
1
There is no field type "string", i think you you mean "text"?sven.kwiotek
I am migrating es2 to es6, it seems "string" is removed .thanks,Vidy Videni

1 Answers

240
votes

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