I tried looking for documentation but it is quite sparse. I wrote the following guide hoping that it might save someone 2-3 hours dealing with installations, setup and configuration.
The performance gains from using Solr are quite spectacular compared to the MySQL fulltext search standard setup. It is definitely worth the time to get this working in your Magento installation.
Install & Configure Tomcat:
Add the following roles and user to the configuration.
<role rolename="admin"/>
<role rolename="manager"/>
<user username="tomcat" password="password" roles="admin,manager"/>
Restart the server: /etc/init.d/tomcat6 restart
If all goes well, goto http://hostname:8080
Install Solr:
Install & Configure
vi /etc/tomcat6/Catalina/localhost/solr.xml
<Context docBase="/usr/share/tomcat6/webapps/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true"> <Environment name="solr/home" type="java.lang.String" value="/usr/share/tomcat6/solr" override="true" /> </Context>
You should see Solr access on your Tomcat admin/manager page (http://hostname:8080/manager/html)
Configure Magento to use Solr:
Replace the original Solr conf directory with the Magento conf files. The trick is just to copy the directory from Magento, and replace the one in Solr. That's it!
Troubleshooting:
Make sure all configuration files belong to tomcat6:tomcat6
chown -r tomcat6.tomcat6 ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With