Solr can't find resource stopwords_en.txt

Randall Ma picture Randall Ma · Jul 8, 2012 · Viewed 9k times · Source

I'm trying to setup Solr 3.6.0 with Django-haystack Beta 2.0.0.

After running ./manage.py build_solr_schema and moving schema.xml to the conf directory, upon visiting http://localhost:8983/solr/admin, I receive an error exactly like the one produced in this thread.

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

At the bottom of the thread, a user mentions that schema.xml must be edited to match stopwords_en.txt to the /example/solr/conf/ directory, which I did both through a symbolic link and by editing all instances of stopwords.txt to /solr/conf/stopwords_en.txt in the generated schema.xml file. However, the same error persists, giving a slightly different output:

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

What file must I edit to fix this problem?

Answer

Parvin Gasimzade picture Parvin Gasimzade · Jul 9, 2012

It can't find stopwords_en.txt file in the classpath. You should add stopwords_en.txt file into the solr/conf/ directory. You can find more information about stopwords here.