This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Buildout recipe that installs and configures Apache Solr. The recipe was made to make it easy to setup Solr for Haystack. It has only been tested with Haystack 1.2.3 and Solr 3.6.2.


  • Java 1.5 or greater from Oracle, OpenJDK or IMB. Gnu GCJ does not work. Run java -version to see what version you have installed if any.


  1. Add something like this to your buildout.cfg:

    parts =
    recipe = solr_recipe
    solr_version = 3.6.2
    loglevel = INFO
  2. The configuration above will work with Haystack. It installs a script in bin/, and stores data in var/solr/data/.

  3. Run bin/buildout.

  4. Add schema.xml to var/solr/home/. See solr_classpath for information about how this works.

  5. Run bin/


If you use Haystack, you should use:

$ python build_solr_schema -f var/solr/home/conf/schema.xml

in step 3. See the run_solr_extra_startup_commands option below for how to automate this.


solr_version (required)
The solr version to download from the mirror.
The Apache mirror to download from. Defaults to
The Java executable to use in Defaults to java.

A Jinja2 template used to generate the solr file. It gets all options added to the section as template variables, so loglevel and any other options you add will be available in the template. If no template file is specified, we use this template:

.level = {{ loglevel }}

# Write to the console:
handlers = java.util.logging.ConsoleHandler
Specifies the loglevel for the solr_logconfig_tplfile. Defaults to INFO.
The directory where solr should store data. This is forwarded to solr via in Defaults to var/<sectionname>/data/, where <sectionname> is the name of the buildout config section (solr in the example above). The directory is created (recursively) if it does not exist.
Instead of using our example config-directory, you can configure your own using this option. Defaults to var/<sectionname>/home/, which is copied from the solr_recipe/files/example-solr3.6-config/-directory in the python package if it does not exists (links to the latest version - select the tag matching your version to view the actual files). The default directory does not include a schema.xml.
Add extra directories to the Java classpath. Added to with the -classpath option. Refer to java -help for more info about the format. You can use this to provide a directory where you override any config files in solr_home. Defaults to var/<sectionname>/config_overrides.

Extra shell commands to run before starting solr in Typically used to generate the Haystack schema automatically before starting solr. Example:

recipe = solr_recipe
run_solr_extra_startup_commands =
    echo "Starting Apache Solr"
    python ${buildout:directory}/ build_solr_schema -f ${buildout:directory}/var/solr/home/conf/schema.xml

Just like run_solr_extra_startup_commands, but these are added to after the command to start/run Solr. Example:

recipe = solr_recipe
run_solr_extra_shutdown_commands =
    echo "Solr was stopped. Exited with exit code $?"


We create var/<sectionname>/config_overrides even when it is not on the solr_classpath. This is simply because it does not hurt, and detecting if it is on the classpath is just unneeded complexity.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
solr_recipe-1.0.tar.gz (39.0 kB) Copy SHA256 Checksum SHA256 Source Jan 31, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting