没有在字段[名称]上声明类型[string]的处理程序


106

type声明string为时,Elasticsearch 6.0将显示此错误。

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

2
没有字段类型“字符串”,我想你的意思是“文本”?
sven.kwiotek

我正在将es2迁移到es6,似乎删除了“字符串”。谢谢,
Vidy Videni

Answers:


222

Elasticsearch删除了该string类型,现在正在使用text。所以你的代码应该是这样的

"name" => [
  "type" => "text",
  "analyzer" => "ik_max_word"
]
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.