【问题标题】:No handler for type [string] declared on field [name]没有在字段 [name] 上声明的类型 [string] 的处理程序
【发布时间】:2017-11-23 10:07:26
【问题描述】:

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

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

【问题讨论】:

标签: elasticsearch elasticsearch-mapping elasticsearch-6


【解决方案1】:

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

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

【讨论】:

  • 另外,如果你对 :uuid 有错误,那么将 'string' 更改为 'keyword'。
猜你喜欢
  • 2018-06-16
  • 1970-01-01
  • 2016-10-02
  • 1970-01-01
  • 2017-08-04
  • 1970-01-01
  • 1970-01-01
  • 2013-11-15
  • 1970-01-01
相关资源
最近更新 更多