首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >创建索引时出现Elasticsearch错误,可能是由于模块Kuromoji安装不正确

创建索引时出现Elasticsearch错误,可能是由于模块Kuromoji安装不正确
EN

Stack Overflow用户
提问于 2015-07-10 10:23:37
回答 1查看 379关注 0票数 1

我正在尝试为我刚刚获得访问权限的Rails应用程序设置本地环境,该应用程序使用Elasticsearch 1.3和两个模块(kuromoji和smartcn)。

我已经按照说明安装了Elasticsearch和模块,当我启动elasticsearch时,我得到了以下输出:(注意插件行,它让我相信它们已经加载了)

代码语言:javascript
复制
$ elasticsearch
[2015-07-10 09:56:05,887][INFO ][node                     ] [Rune] version[1.3.9], pid[4364], build[0915c73/2015-02-19T12:34:48Z]
[2015-07-10 09:56:05,887][INFO ][node                     ] [Rune] initializing ...
[2015-07-10 09:56:05,930][INFO ][plugins                  ] [Rune] loaded [analysis-smartcn, analysis-kuromoji], sites []
[2015-07-10 09:56:08,469][INFO ][node                     ] [Rune] initialized
[2015-07-10 09:56:08,469][INFO ][node                     ] [Rune] starting ...
[2015-07-10 09:56:08,577][INFO ][transport                ] [Rune] bound_address {inet[/127.0.0.1:9301]}, publish_address {inet[/127.0.0.1:9301]}
[2015-07-10 09:56:08,596][INFO ][discovery                ] [Rune] elasticsearch_brew/X-HUXjxxT6CtRblL2zANSg
[2015-07-10 09:56:11,611][INFO ][cluster.service          ] [Rune] new_master [Rune][X-HUXjxxT6CtRblL2zANSg][boobooninja.local][inet[/127.0.0.1:9301]], reason: zen-disco-join (elected_as_master)
[2015-07-10 09:56:11,633][INFO ][http                     ] [Rune] bound_address {inet[/127.0.0.1:9201]}, publish_address {inet[/127.0.0.1:9201]}
[2015-07-10 09:56:11,634][INFO ][node                     ] [Rune] started
[2015-07-10 09:56:11,647][INFO ][gateway                  ] [Rune] recovered [0] indices into cluster_state

但是,当我尝试运行rake任务来索引和导入数据时,我得到了以下错误,这让我相信Kuromoji没有加载,或者可能发生了其他事情。

代码语言:javascript
复制
[!!!] Error when creating the index: Elasticsearch::Transport::Transport::Errors::BadRequest
[400] {"error":"IndexCreationException[[development-activities] failed to create index]; nested: ElasticsearchIllegalArgumentException[failed to find token filter type [kuromoji_readingform] for [katakana_readingform]]; nested: NoClassSettingsException[Failed to load class setting [type] with value [kuromoji_readingform]]; nested: ClassNotFoundException[org.elasticsearch.index.analysis.kuromojireadingform.KuromojiReadingformTokenFilterFactory]; ","status":400}
[IMPORT] Done

我很感谢在这里解决这个问题的任何帮助。

EN

回答 1

Stack Overflow用户

发布于 2016-03-27 14:27:25

这条消息似乎是关于kuromoji插件的。尝试安装插件。

代码语言:javascript
复制
cd path/to/yourelasticsearch
bin/plugin install elasticsearch/elasticsearch-analysis-kuromoji/2.7.0

请注意,您需要安装正确版本的kuromoji插件,这取决于您安装的elasticsearch版本。参见here

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31331448

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档