Last updated January 9, 2012. Created by aufumy on December 6, 2008.
Edited by Nick_vh, yngens, pfrenssen, technicalknockout. 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.
Related Projects For Drupal 7
- ApacheSolr Attachments
- Apache Solr Organic Groups Integration
- ApacheSolr Views integration (note - may be unsupported)
- Apache Solr Stats
- Apache Solr autocomplete
- Apache Solr Multilingual
- Apachesolr Panels
- Apache Solr Sort UI
- Apachesolr Commerce
- Apachesolr User indexing
- Apachesolr Term
- Display Suite
Related Projects For Drupal 6
- Apache Solr Custom Path
- ApacheSolr Attachments
- Multisite search
- Apache Solr Organic Groups Integration (for 6.x-2.x)
- Local Solr (geospatial search)
- ApacheSolr Ubercart
- ApacheSolr Views integration (note - may be unsupported)
- Webmail Plus
- Exhibit
- Project
- Solr Service
- Apache Solr Stats
- Apache Solr autocomplete
- Apache Solr AJAX
- Apache Solr Biblio
- Simple Geo
- Apache Solr Money Slider
- Node displays
- Apache Solr Multilingual
- Assistant
- Assistant ref
- Assistant search
- CiviCRM integration
- Nodereference Extras
- Panels support
Other documentation and videos
- HowTo video from Got Drupal, focusing on Acquia Search
- Robert's Apache Solr talk at DrupalCamp Stockholm
- Using hook_apachesolr_cck_field_mappings()
- http://dc2009.drupalcon.org/session/more-search-how-apachesolr-changes-w...
- Slides from Robert's ApacheSolr presentation at Do it With Drupal.
- http://drupal.org/node/326265
- http://robshouse.net/blog-post/fosdem-2008-drupal-apachesolr-module-0
- http://www.archive.org/details/drupal_search
- Solr and reverse proxy with Varnish
- Views 3 + Apache Solr
- Random results with Apache Solr
- Installing on CentOS
- Another writeup on installing on CentOS with Jetty
- Load balancing with haproxy
There is another Drupal module for interfacing with Solr but it is currently less developed.
You should also read the README.txt as it may be more up to date than this page.
Use Solr 1.4.x
The configuration files use features from Solr 1.4.x, so Solr 1.3 is not supported..
Installation
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
Install the the Apache Solr Drupal module files as you would any Drupal module.
For Drupal 6.x-1.x and 6.x-2.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, 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/ SolrPhpClientNote 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.
Those without svn, etc may also choose to try the bundled Acquia Search download, which includes all these items which are not in Drupal.org git repository due to use git policy. See the download link here: http://acquia.com/documentation/acquia-search/activation
You should now be able to enable the Drupal module, but you may wish to wait until Solr is running (see below).
Installing Solr
Download Solr 1.4 from a mirror site: http://www.apache.org/dyn/closer.cgi/lucene/solr/
Unpack the tarball somewhere not visible to the web (not in your apache docroot and not inside of your drupal directory).
The Solr download comes with an example application that you can use for testing, development, and even for smaller production sites. This application is found at apache-solr-1.4.x/example.
Rename apache-solr-1.4.x/example/solr/conf/schema.xml and solrconfig.xml to something like *.bak. Then copy the schema.xml and solrconfig.xml that come with the Apache Solr Drupal module to take their place.
Now start the Solr application by opening a shell, changing directory to apache-solr-1.4.x/example, and executing the command java -jar start.jar
Test that your Solr server is now available by visiting http://localhost:8983/solr/admin/
Ensure that both the main Apache Solr Framework and Apache Solr Search modules are enabled. NOTE: If the Apache Solr Search module is not enabled no indexing will occur.
Now run cron on your Drupal site until your content is indexed.
Return field list when using Jetty http://localhost:8983/solr/admin/luke?numTerms=0&wt=json
Enable blocks for facets at Administer > Site building > Blocks.