11

我尝试按照nutch 教程进行操作,但 schema.xml 文件有点问题。

我被告知 nutch 为我的项目提供了架构,基本上是这个......

cp ${NUTCH_RUNTIME_HOME}/conf/schema.xml ${APACHE_SOLR_HOME}/example/solr/conf/

我已经在 Tomcat 中部署了我的 solr 文件,当我转到 Solr 仪表板时出现的错误是

collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Plugin init failure for [schema.xml] fieldType "text": 
Plugin init failure for [schema.xml] analyzer/filter:
Error loading class 'solr.EnglishPorterFilterFactory'

这与我的 solrconfig.xml 文件中的这个元素有关(我可以将其注释掉,但不确定这有多重要)

<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>

我编辑了我的 solrconfig.xml 以尝试包含一系列 solr 附带的 jar 文件,特别是

<lib path="/etc/solr/collection1/libs/dist/solr-core-4.2.1.jar" />
<lib path="/etc/solr/collection1/libs/dist/solr-analysis-extras-4.2.1.jar" />

但我不认为它们包含缺少的类“solr.EnglishPorterFilterFactory”

有谁知道为什么这可能不起作用或者我错过了什么?顺便说一句,我不是 Java 开发人员,所以毫无疑问它会很简单:)

更新 发现架构引用了一些旧类后,我又查看了 nutch/conf 和 tt 看起来有一个 ${NUTCH_RUNTIME_HOME}/conf/schema-solr4.xml 文件似乎可以工作。

如果这是正确的,则不是 100%,但是嘿...

4

1 回答 1

12

看起来EnglishPorterFilterFactory在 4.x 中不再存在。请参阅它的 3.6.0 文档中的注释:

Deprecated.
  Use SnowballPorterFilterFactory with language="English" instead

很多弃用的东西在 4.0 中消失了。我会照它说的做,请参阅SnowballPorterFilterFactory 的文档

于 2013-04-11T15:30:26.313 回答