我试着关注 nutch tutorial但是 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% 是正确的,但是嘿...
最佳答案
看起来 EnglishPorterFilterFactory
在 4.x 中不再存在。请参阅 it's 3.6.0 documentation 中的注释:
Deprecated.
Use SnowballPorterFilterFactory with language="English" instead
很多弃用的东西在 4.0 中消失了。我会照它说的去做,请参阅 documentation for SnowballPorterFilterFactory .
关于linux - Apache Nutch 和 Solr 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15945927/