Solr Search

From CKAN

Jump to: navigation, search

This page lists additional information for running CKAN with an Apache Solr search backend. There are basic details on install at: http://readthedocs.org/docs/ckan/en/latest/install-from-source.html

Contents

Deployment

This documents the install under Ubuntu LTS (as required for a Debian install of CKAN).

 -e hg+https://bitbucket.org/okfn/ckanext-solr#egg=ckanext-solr
 search_backend = solr
 solr_url = http://localhost:8983/solr
 #solr_user = <NOT REQUIRED> 
 #solr_password = <NOT REQUIRED>

Config settings

The extension has some options:

Schema updates

Each time the schema is updated, the index data needs to be dropped and regenerated. This can be done by running the following commands:

 rm -rf /var/lib/solr/data/*
 paster --plugin=ckan search-index --config=/etc/ckan/$INSTANCE/$INSTANCE.ini rebuild

Multiple cores

Solr supports multi-core operation which is very convenient for running multiple services against the same server. This is not required, however, to separate multiple CKAN installs: these filter any request via ckan.site_id anyway and multiple CKAN installs can use the same core without any trouble. To set up multicore, follow these steps:

 <solr persistent="true" sharedLib="lib">
  <cores adminPath="/admin/cores">
   <core name="ckan" instanceDir="ckan">
     <property name="dataDir" value="/var/lib/solr/data/ckan" />
   </core>
  </cores>
 </solr>

To add further core, copy the conf directory into a new named subfolder of /var/lib/jetty/webapps/solr/, replace the schema.xml and create an empty data directory in /var/lib/solr/data that the jetty process can write to. Then add a section to the XML file and restart jetty.

Extension info

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox