es 创建索引报错_ES添加映射报错analyzer [ik_max_word] not found for field [title]
給索引創(chuàng)建映射報錯
{
"error":{
"root_cause":[
{
"type":"mapper_parsing_exception",
"reason":"analyzer [ik_max_word] not found for field [title]"
}
],
"type":"mapper_parsing_exception",
"reason":"analyzer [ik_max_word] not found for field [title]"
},
"status":400
}
原因
未安裝ik分詞插件
解決辦法
安裝分詞插件
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.3.2/elasticsearch-analysis-ik-6.3.2.zip
注意
ik分詞和es的版本要保持一致,不然安裝分詞插件的時候會報錯如下錯誤
Exception in thread "main" java.lang.IllegalArgumentException: Plugin [analysis-ik] was built for Elasticsearch version 6.3.0 but version 6.3.2 is running
at org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:421)
at org.elasticsearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:596)
at org.elasticsearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:717)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:641)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:225)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:210)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:79)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)
啟動ES加載插件
./bin/elasticsearch &
[2020-09-12T11:01:02,369][INFO ][o.e.p.PluginsService ] [zvSqFpX] loaded plugin [analysis-ik]
總結(jié)
以上是生活随笔為你收集整理的es 创建索引报错_ES添加映射报错analyzer [ik_max_word] not found for field [title]的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos7 网卡配置vlan_Cen
- 下一篇: git ssh配置完后拉取代码_Git中