Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2569 posts at DZone. You can read more from them at their website. View Full User Profile

How to Install Solr 3 on Drupal 7

11.11.2011
| 8376 views |
  • submit to reddit
If you ran into the same problem installing Apache Solr 3.x on Drupal 7.x as one user on Drupal's forum, you're in luck.  That same user figured it out and posted a comment that is organized here as a tutorial. The instructions are for Unix or Mac OS X users, but if you replace the example folders with the correct Windows or Linux parallels, you should be just fine.  These instructions use the Search API, so that is universally applicable to any OS.
  1. Download the Apache Solr 7.x-1.x-dev module from the Apachesolr module and place it in your drupal folder for contributed modules. Typically this is sites/all/contrib

  2. Enable ApacheSolr and ApacheSolr Search modules in admin/build/modules

  3. Download Apache Solr http://apache.megamobile.be//lucene/solr/3.4.0/apache-solr-3.4.0.zip

  4.  

  5. Unpack it somewhere outside your drupal installation and outside your web root/folder. Suggestion would be ~/Servers/apache-solr-3.4

  6. Go to sites/all/contrib/apachesolr/solr-conf and copy all files to ~/Servers/apache-solr-3.4/example/solr/conf

  7. In ~/Servers/apache-solr-3.4/example/solr/conf you can remove schema.xml and rename schema-solr3x.xml to schema.xml

  8. Open your command prompt and do cd ~/Servers/apache-solr-3.4/example

  9. Type the following command to start the Apache Solr service
    java -jar start.jar.
    If all went well your Solr Server is running now! Congratulations!

  10.  

  11. Test your solr server admin interface by visiting http://localhost:8983/solr/admin
  12. Go to admin/config/search/apachesolr/settings and click on edit. Verify if the url http://localhost:8983/solr/ is correctly entered and click ok
  13. Optional(Facets): If you want Facets you should download Facet API and enable it. When this is done you can go to admin/config/search/apachesolr/facets and enable the facets you'd want
  14. Optional(Security): Careful because Solr comes unprotected. If you'd like to run Solr in a more permanent basis I would recommend to run it on Tomcat as described in my other guide http://www.nickveenhof.be/blog/setting-drupal-6-apache-solr-tomcat-6-and... and put an IP-filter in front of it.

  15. Optional(Multicore): if you want to run multicore you can type java -Dsolr.solr.home=multicore -jar start.jar.
    Attention: All your files should be in multicore/core0/conf




Source: http://drupal.org/node/1332144#comment-5213384

Comments

Kathy John replied on Thu, 2012/02/23 - 11:31am

Then it is probably a file permission problem. Make sure your config files have the right encoding type and that you have copied solrconfig and schema.xml correctly.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.