-
Notifications
You must be signed in to change notification settings - Fork 13
Installing ApacheSolr 4.x
Needed components
Download the latest version of apache solr from http://lucene.apache.org/solr/
Download the contrib module of apache solr from https://drupal.org/project/apachesolr
Extract the apache solr to an easy to remember location(The home folder can be a good idea).
We called that APACHE_SOLR_FOLDER
Install
In the cotrib module you downloaded there is a folder called solr-conf.
In the folder there is a folder for the version of apache solr:
We need the files from solr-4.x.
This are the needed files:
solrconfig.xml
schema.xml
protwords.txt
Copy those files to APACHE_SOLR_FOLDER/example/solr/collection1/conf
If you are trying to run apachesolr using the config files from apachesolr module and you're getting the error:
solr could not load config for solrconfig.xml
And the error appears even though the file exists in the directory and it looks good and the right permissions are set...
The solution is:
- Edit the file
solrconfig.xml
. - Search for the string
indexConfig
. - You should see that three params are duplicated in the
indexConfig
section. - Remove the duplicate lines so they will only appear once in the file:
<useCompoundFile>false</useCompoundFile>
<ramBufferSizeMB>32</ramBufferSizeMB>
<mergeFactor>10</mergeFactor>
After doing that, make sure you restart apachesolr and clearcache in drupal. Now it works!