Last updated October 21, 2014. Created on December 6, 2008.
Edited by dooug, ChristophWeber, DamienMcKenna, paravibe. Log in to edit this page.

This documentation is for the Apache Solr Search Integration module that integrates Drupal with a Solr server for searching.

Other documentation and videos

You should also read the 7.x-1.x README.txt as it may be more up to date than this page.

Use Solr 1.4.x, 3.5.x or 4.6.x

The configuration files use features from Solr 1.4.x, so Solr 1.3 is not supported. Solr 4.6.0 or 3.5.0 or later is now preferred.

Installation Prerequisites

Prerequisites: Java 5 or higher. For Drupal 6.x-1.x, PHP 5.2 is recommended, but PHP 5.1.4 will work if you install the into PHP the PECL json extension or (for those who cannot install PHP extensions) if you install the Zend Framework JSON classes as described in the README.txt

For Drupal 6.x-1.x you need the PHP library from the external project. The project is found at: http://code.google.com/p/solr-php-client/.

This library can be installed either in the apachesolr module directory (required for 6.x-1.x), or in sites/all/libraries/. The latter requires you to have the Libraries module installed, but has the benefit that the library does not need to be reinstalled when performing module upgrades.

To install the library, go to either the apachesolr module directory or sites/all/libraries/, and run this command:

svn export -r22 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient

Note that revision 22 is the currently tested and suggested revision. It is generally not needed to install newer versions (like r60). Make sure that the final directory is named SolrPhpClient under the apachesolr module directory.

Installing Apache Solr

Instructions for installing apache solr on your environment can be found here

Enabling facets

(7.x or 6.x-3.x)

(in order to do this, you have to install FacetAPI)
1. Go to Administer > Configuration > Apache Solr Search > Settings
2. Click "facets" next to the search environment you're currently using.
3. Check the facets that you want to add an click "Save configuration".
4. Go to Administer > Structure > Blocks. A block for each facet that you enabled will be available. Place the block in the region where you want it to show.
5. Click "Save blocks."

Enabling facets (6.x)

Enable blocks for facets at Administer > Site building > Blocks.

Upgrades from 6.x-1.x or 6.x-2.x

IMPORTANT: there is no upgrade path from 6.x-1.x or 6.x-2.x. If you previously
installed those modules you must disable and uninstall them prior to
installing 6.x-3.x or 7.x-1.x.

You will have to install the new schema.xml and solrconfig.xml files, and restart
the Solr server (or core) and delete your index and reindex all content.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.