Solr找不到资源stopwords_en.txt

Ran*_* Ma 10 django solr stop-words django-haystack

我正在尝试使用Django-haystack Beta 2.0.0设置Solr 3.6.0.

运行./manage.py build_solr_schemaschema.xml并将其移动到conf目录后,在访问时http://localhost:8983/solr/admin,我收到的错误与此线程中生成的错误完全相同.

org.apache.solr.common.SolrException: No cores were created, please check the logs for errors

java.lang.RuntimeException: Can't find resource 'stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example

在线程的底部,用户提到必须编辑schema.xml以匹配stopwords_en.txt到/ example/solr/conf /目录,我通过符号链接和编辑stopwords.txt的所有实例来完成.到生成的schema.xml文件中的/solr/conf/stopwords_en.txt.但是,同样的错误仍然存​​在,输出略有不同:

java.lang.RuntimeException: Can't find resource '/solr/conf/stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example

我必须编辑哪个文件才能解决此问题?

Par*_*ade 7

它无法stopwords_en.txt在类路径中找到文件.您应该将stopwords_en.txt文件添加到solr/conf/目录中.您可以在此处找到有关停用词的更多信息.


Or *_*bel 6

更好的方法是在schema.xml中找到所有出现的stopwords_en.txt,并用lang/stopwords_en.txt替换它们