Solr Front-end

Post on 27-Dec-2016

224 views 1 download

Transcript of Solr Front-end

Solr Front-endNick Ruest (York University) and Melissa Anez (Islandora Foundation)

You Are Here

Why Solr?

Because it’s faster.

And it has facets.

How Solr?

Solr builds on Lucene and provides indexing and search technology, as well as spell-checking, hit highlighting and advanced analysis/tokenization capabilities. Both Solr and Lucene are managed by the Apache Software Foundation.

- Solr Guide

How Solr?

In Islandora, Solr works with GSearch to index the objects in your repository.

It uses an xslt in Gsearch to index the FOXML documents in your repository

How Solr?

An xslt and solrschema.xml come packaged with GSearch. They work out of the box but can be customized.

xslt - transforms a Fedora FOXML document into a Solr xml document.solrchema.xml - controls how Solr indexes xml files.

Islandora with Solr

Islandora uses Solr to make objects in your Islandora installation discoverable and allow you to configure search fields for searching and faceting.

Whenever you add a new object in Fedora, the Solr module updates your index, and makes those results available to your users.

Islandora with Solr

Islandora Solr indexes the metadata, full text, and OCR of objects in the Fedora Commons repository.

It does not search Drupal nodes or other Drupal-only content.

Configuring Solr

Configuring Solr

The Solr module comes with support for simple Dublin Core and simple MODS (i.e. no qualified fields!) searching and faceting.

Solr Permissions

Users needs Drupal permissions to search the Solr index.

Results can then be restricted to certain roles on a field-by-field basis.

Solr Blocks

Islandora Solr comes with six blocks that need to be set in regions:● Islandora advanced search ● Islandora simple search● Islandora facets ● Islandora query ● Islandora sort ● Islandora displays

Basic Configs

Solr lives by default at http://localhost:8080/solr

Top-level Islandora Solr configuration is at Islandora -> Solr index -> Solr settings

Basic Configs - Display Profiles

Primary - How your search results look

Secondary - Download search results

Configuring Solr ResultsIf Solr results are not configured, the results page will display all metadata on the object.

This is very ugly.

Configuring Solr Results● Go to Islandora -> Solr index -> Solr settings

● Go to Default display settings

● Start typing mods_titleInfo_title_ms (autocomplete field should narrow the results quickly) and add the field once complete.

Configuring Solr Results● Click Configure

● Label the field Title and check Link to object

● Save Solr configuration and go search

● Check Limit results to fields listed above and resave.

Configuring Solr Sort

Sort fields must be single valued fields. You can’t sort on a field that may have two authors for example.

If you wanted to sort on title, you could sort on the Fedora label field as it is single valued.

Configuring Solr Sort● Go to Solr settings

● Go to Sort settings

● Start typing mods_originInfo_dateIssued_dt and add the field once complete.

● Click Configure and label the field Sort by Date.

Configuring Solr FacetsIn the default Solr config, metadata is stored as both strings (ms) and token (mt). Strings treat multi-word fields as one chunk, token treats each word as an individual piece.

Strings work best for faceting. Text works best for search.

Configuring Solr Facets

Example:

String = facet for “Prince Edward Island”Tokens = facets for “Prince,” “Edward,” and “Island”

Configuring Solr Facets● Go to Solr settings

● Go to Facet settings

● Start typing mods_subject_hierarchicalGeographic_city_ms and add the field once complete.

● Click Configure and label the facet City.

Configuring Solr Facets

● Start typing mods_name_personal_namePart_ms and add the field once complete.

● Click Configure and label the facet Name.

Configuring Advanced SearchSimple search searches the full text of the object. Advanced search allows you to select certain fields to search on.

Unlike facets, the text (mt) version is each field is best for search.

Configuring Advanced Search● Go to Solr settings

● Go to Advanced search block

● Start typing mods_name_personal_namePart_mt and add the field once complete.

● Click Configure and label the field Name.

Other Config Options● Query defaults

○ Can be used to shape the way Solr results are presented to the end user, e.g. by limiting to particular namespaces.

● Required Solr fields○ Defaults should be fine unless you’re doing

advanced configuration.

Solr Metadata

Solr Views