问题描述
在Cloud模式下将Apache OpenNLP与Solr(版本7.3.0)一起使用时出现错误.当我像这样使用open nlp将字段类型添加到 managed-schema 时:
I have error when using Apache OpenNLP with Solr (ver. 7.3.0) in Cloud mode. When I add field type to managed-schema using open nlp like this:
<fieldType name="text_opennlp" class="solr.TextField">
<analyzer>
<tokenizer class="solr.OpenNLPTokenizerFactory"
sentenceModel="opennlp/en-sent.bin"
tokenizerModel="opennlp/en-token.bin"
/>
</analyzer>
</fieldType>
<field name="content" type="text_opennlp" indexed="true" termOffsets="true" stored="true" termPayloads="true" termPositions="true" docValues="false" termVectors="true" multiValued="true" required="true"/>
我有以下错误:
我从 https://builds.apache.org/job/Solr-Artifacts-7.3/lastSuccessfulBuild/artifact/solr/package/
我试图将模型文件放入:D:\utils\solr-7.3.0-7\solr-7.3.0-7\server
,但这没有帮助.
I tried to put model files to: D:\utils\solr-7.3.0-7\solr-7.3.0-7\server
but it didn't help.
这是我的相关问题:
也许我需要将模型文件放在其他地方?
Maybe I need to put model files somewhere else?
推荐答案
您需要将这些文件("en-sent.bin"
和另一个)放入内核的conf目录中.
You need to put those files ("en-sent.bin"
and the other one) into core's conf directory.
就是D:\utils\solr-7.3.0-7\solr-7.3.0-7\server\{core_name}\conf
.
然后直接使用文件.以下应该是xml配置.
Then use the files directly. Following should be the xml configuration.
<tokenizer class="solr.OpenNLPTokenizerFactory"
sentenceModel="en-sent.bin"
tokenizerModel="en-token.bin"
/>
这篇关于SolrCloud OpenNLP错误在类路径或"/configs/_default"中找不到资源"opennlp/en-sent.bin"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!