我是靠谱客的博主 酷炫野狼,最近开发中收集的这篇文章主要介绍es 创建索引报错_ES添加映射报错analyzer [ik_max_word] not found for field [title],觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

给索引创建映射报错

{

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

最后

以上就是酷炫野狼为你收集整理的es 创建索引报错_ES添加映射报错analyzer [ik_max_word] not found for field [title]的全部内容,希望文章能够帮你解决es 创建索引报错_ES添加映射报错analyzer [ik_max_word] not found for field [title]所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(54)

评论列表共有 0 条评论

立即
投稿
返回
顶部