Drumbeat/Website/Install/Solr
Installing Apache solr
Prerequisite: Java 5 or higher (a.k.a. 1.5.x). PHP 5.1.4 or higher.
Before enabling it, you must do the following: Get the PHP library from the external project.
From the apachesolr module directory, run this command:
svn checkout -r6 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient
Note that revision 6 is the currently tested and suggested revision. Make sure that the final directory is named SolrPhpClient under the apachesolr module directory. Note: the 2009-03-11 version of the library from the googlecode page is r5 and will not work with beta6+.
Download Solr trunk (candidate 1.4.x build) from a nightly build or build it from svn.
Once Solr 1.4 is released, you will be able to download from: 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-nightly/example.
Move apache-solr-nightly/example/solr/conf/schema.xml and rename it to something like schema.bak. Then move the schema.xml that comes with the ApacheSolr Drupal module to take its place.
Similarly, move apache-solr-nightly/example/solr/conf/solrconfig.xml and rename it like solrconfig.bak. Then move the solrconfig.xml that comes with the ApacheSolr Drupal module to take its place.
Now start the solr application by opening a shell, changing directory to apache-solr-nightly/example, and executing the command
java -jar start.jar
Test that your solr server is now available by visiting
http://localhost:8983/solr/admin/
The Solr client has been tested with Zend framework release 1.7.7. To get this code, you may use svn from the apachesolr directory:
svn co http://framework.zend.com/svn/framework/standard/tags/release-1.7.7/library/Zend
However, the only required parts are: http://framework.zend.com/svn/framework/standard/tags/release-1.7.7/library/Zend/Exception.php http://framework.zend.com/svn/framework/standard/tags/release-1.7.7/library/Zend/Json/ The 'Zend' directory should normally be under the apachesolr directory, but may be elsewhere if you set that location to be in your PHP include path.
Now, you should enable the "Apache Solr framework" and "Apache Solr search" modules. Check that you can connect to Solr at ?q=admin/setting/apachesolr Now run cron on your Drupal site until your content is indexed. You can monitor the index at ?q=admin/settings/apachesolr/index
The solrconfig.xml that comes with this modules defines auto-commit, so it may take a few minutes between running cron and when the new content is visible in search.
This configuration information is also provided in sites/all/modules/contrib/apachesolr/README.txt