不能在 Solr 中使用 ICUTokenizerFactory [英] Can not use ICUTokenizerFactory in Solr

查看:36
本文介绍了不能在 Solr 中使用 ICUTokenizerFactory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Solr 架构中使用 ICUTokenizerFactory.这就是我定义 fieldfieldType 的方式.

I am trying to use ICUTokenizerFactory in Solr schema. This is how I have defined field and fieldType.

<fieldType name="text_icu" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="solr.ICUTokenizerFactory"/>
    </analyzer>
</fieldType>

<field name="fld_icu" type="text_icu" indexed="true" stored="true"/>

而且,当我启动 Solr 时,出现此错误

And, when I start Solr, I am get this error

Plugin init failure for [schema.xml] fieldType "text_icu": Plugin init failure for [schema.xml] analyzer/tokenizer: Error loading class 'solr.ICUTokenizerFactory'

我已经搜索过了,但没有成功.我不知道是我遗漏了什么还是架构有问题.如果有人尝试过 ICUTokenizerFactory 那么请提出可能是什么问题.

I have searched in for that with no success. I don't know if I am missing something or there is some problem in schema. If someone has tried ICUTokenizerFactory then please suggest what could be the problem.

推荐答案

来自维基:

Lucene 支持使用 analysis-extras contrib 模块中的 solr.ICUTokenizerFactory 将这些语言分割成音节.要使用此标记器,请参阅 solr/contrib/analysis-extras/README.txt 以获取有关需要将哪些 jar 添加到 SOLR_HOME/lib 的说明

Lucene provides support for segmenting these languages into syllables with solr.ICUTokenizerFactory in the analysis-extras contrib module. To use this tokenizer, see solr/contrib/analysis-extras/README.txt for instructions on which jars you need to add to your SOLR_HOME/lib

这篇关于不能在 Solr 中使用 ICUTokenizerFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆