Setting up Solr
This documentation needs work. See "Help improve this page" in the sidebar.
This is out of date as of October 5th, 2013
Overview
If your work touches anything with project listing pages or certain other features, you may require a working Solr index.
All Drupal.org development sites point to the same shared Solr server hosted at stagingsolr.drupal.org, by default with read-only access. This Solr index gets periodically refreshed from a scrubbed version of the index on the live servers. (TODO: HOW OFTEN?)
To flip your server's access from read-only to writable, you need to adjust an option in settings.local.php. The following instructions walk you through that process.
Enabling Solr on your development site
- Go to Administer >> Reports >> Apache Solr search index (admin/reports/apachesolr) and take note of the current "Number of documents in index." We want that number to go up. :)
- See who else's development sites are currently able to write to Solr, by running the following from /var/www/dev on devwww.drupal.org:
find . -type f -name 'settings.local.php' -exec grep apachesolr_read_only {} +If any of those values come back as 0 rather than 1, like:
./webchick-drupal.redesign.devdrupal.org/htdocs/sites/default/settings.local.php: 'apachesolr_read_only' => 0, // read-only Solr access...then contact the owner of that sandbox to coordinate with them. Otherwise, each of you will over-write each others' changes, and that's no fun!
- All coordinated now? Great. In
sites/default/settings.local.php, you'll find the custom settings for your particular Drupal.org development site. Among them is the following blurb:
$conf += array( 'apachesolr_read_only' => 1, // read-only Solr access 'apachesolr_host' => 'stagingsolr.drupal.org', 'apachesolr_port' => '8080', 'apachesolr_path' => '/solr', );Toggle the apachesolr_read_only value to 0 instead.
- Now, go ahead and create/update/tag content, or do whatever else is needed to populate the Solr index for your development project.
drush cron -v- Return to Administer >> Reports >> Apache Solr search index (admin/reports/apachesolr) and make sure that the "Number of documents in index." has gone up. If so, you're in business!
Local Solr development
You can also grab a copy of the scrubbed live Solr index and play around with it locally. This is located on util.drupal.org at:
/var/dumps/solr/drupal_redesign_solr_distribution-current.tar.bz2 A new copy of the index is taken approximately every 24 hours, and is about 1.5 GB in size as of November 2011.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion