Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2578 posts at DZone. You can read more from them at their website. View Full User Profile

How to Install Solr 3 on Drupal 7

  • 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


  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!


  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 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



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.