SolrΒΆ

Solano CI supports the following versions of Solr: 1.4.1, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.1, 4.0.0, 4.1.0, 4.2.0, 4.10.4, 5.4.0, and 6.0.0.

You can enable Solr by specifying a version in your solano.yml configuration file:

solr:
  version: '4.2.0'
  # path: 'solr/test'  # 'solr' is default

For ruby applications, Solano CI will automatically enable a Solr server for each thread if your Gemfile contains rsolr, acts_as_solr, sunspot, or sunspot_rails.

Solano CI will set the following environment variables:

SOLR_URL
WEBSOLR_URL
TDDIUM_SOLR_HOST
TDDIUM_SOLR_PORT
TDDIUM_SOLR_PATH

Note

Both SOLR_URL and WEBSOLR_URL will get set to the URL of the local Solr server started for the test worker. The WEBSOLR_URL will not include an API key. We are investigating how to make this more compatible with the websolr-sunspot_rails gem.

In addition, Solano CI creates a config/solr.yml and config/sunspot.yml that references these environment variables. It will replace any existing configuration file.

You must connect to the Solr server by reading a configuration file or reading the Solr environment variables that Solano CI sets. Using a hard-coded value will probably not work.

Solano CI will copy the solr sub-directory of your repository to the Sunspot Solr home directory before initializing and starting Sunspot/Solr. Each thread gets a separate instance and Solr home directory. This allows you to supply a schema.xml and solrconfig.xml. If you do not have a solr sub-directory at the root of your repository, the default Sunspot template will be used.