When type declared as string , Elasticsearch 6.0 will show this error.
type
string
"name" => [ "type" => "string", "analyzer" => "ik_max_word" ]
Elasticsearch has dropped the string type and now uses text . So your code should be something like this
text
"name" => [ "type" => "text", "analyzer" => "ik_max_word" ]