Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section assumes you already have the Islandora Solr module configured to search Fedora content and Gsearch configured to index Fedora content.  We are also assuming you will continue to use the Islandora Solr module to view the search results.

Modify the Solr schema.xml file

Your schema.xml file will most likely be in /usr/local/fedora/solr/conf or /usr/local/fedora/solr/collection1/conf (assuming $SOLR_HOME = /usr/local/fedora/solr).  We are assuming you installed Solr using the instructions provided in this guide.  The collection1/conf is for more recent versions of Solr.

...

Save the schema.xml file and restart Solr.  After the restart you should be able to view solr at http://ip:port/solr

Apache Solr Module

Once you have Solr configured properly and restarted you can install and configure the Apache Solr module in your Drupal site.  See https://drupal.org/project/apachesolr for more information.  Basically you just download it and enable as you would any other module.  You've already modified the schema.xml so you don't need to do anything with schemal.xml.

At this point if everything is configured properly you should see some Drupal content in your solr index, if you don't see any Drupal content you may have to wait for cron to run or you can force the module to index content from the modules config interface (admin/config/search/apachesolr).

Modify Islandora search results

Islandora will not know how to properly display a result created from a Drupal node so you will either have to add a custom Islandora Solr display profile or use the theme layer to preprocess the results, there are examples of creating a custom display profile in the islandora_solr_module.

...

Note
Modifying the results by using a theme_preprocess hook is probably the easist way to modify your results but is probably also the most brittle. For instance if you change your theme your search results page may break.

Multi-site

If you are using a Drupal multi-site setup and you have more than one Drupal site's content in Solr you will probably want to filter on the site field or the hash field to limit results to just the drupal site you are viewing. This can be done in the Islandora Solr Settings -> Query defaults config page or you can setup a custom request handler in the solrconfig.xml.

Note
TODO: Document how to filter drupal content by site.

 

Content by Label
showLabelsfalse
max5
spacesISLANDORA713
showSpacefalse
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ("search","solr") and type = "page" and space = "ISLANDORA713"
labelssolr search