SolrCloud OpenNLP 错误 Can't find resource 'opennlp/en-sent.bin' in classpath or '/configs/_default'

SolrCloud OpenNLP error Can't find resource 'opennlp/en-sent.bin' in classpath or '/configs/_default'

在云模式下将 Apache OpenNLP 与 Solr(版本 7.3.0)一起使用时出现错误。 当我使用 open nlp 将字段类型添加到 managed-schema 时:

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

我有以下错误:

test_collection_shard1_replica_n1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core test_collection_shard1_replica_n1: Can't load schema managed-schema: org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'opennlp/en-sent.bin' in classpath or '/configs/_default', cwd=D:\utils\solr-7.3.0-7\solr-7.3.0-7\server Please check your logs for more information

我已经从 https://builds.apache.org/job/Solr-Artifacts-7.3/lastSuccessfulBuild/artifact/solr/package/

下载了 solr var 7.3.0-7

我试图将模型文件放到:D:\utils\solr-7.3.0-7\solr-7.3.0-7\server 但它没有帮助。

这是我的相关问题:

也许我需要将模型文件放在其他地方?

您需要将这些文件("en-sent.bin" 和另一个)放入核心的 conf 目录中。

也就是D:\utils\solr-7.3.0-7\solr-7.3.0-7\server\{core_name}\conf.

然后直接使用文件。下面应该是xml配置。

<tokenizer class="solr.OpenNLPTokenizerFactory"
          sentenceModel="en-sent.bin"
          tokenizerModel="en-token.bin"
        />