Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr can't find resource stopwords_en.txt

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?

like image 589
Randall Ma Avatar asked Jul 08 '12 21:07

Randall Ma


3 Answers

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.

like image 179
Parvin Gasimzade Avatar answered Nov 06 '22 20:11

Parvin Gasimzade


A better way is to find all occurrences of stopwords_en.txt in schema.xml and replace them with lang/stopwords_en.txt

like image 40
Or Arbel Avatar answered Nov 06 '22 20:11

Or Arbel


You have to put stopwords_en.txt in the path . Make a file name stopwords_en.txt and paste beside the schema.xml. I hope you know what stopword filter is used.....

like image 2
chandresh Avatar answered Nov 06 '22 22:11

chandresh