Solr Front-end

30
Solr Front-end Nick Ruest (York University) and Melissa Anez (Islandora Foundation)

Transcript of Solr Front-end

Page 1: Solr Front-end

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

Page 2: Solr Front-end

You Are Here

Page 3: Solr Front-end

Why Solr?

Because it’s faster.

And it has facets.

Page 4: Solr Front-end

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

Page 5: Solr Front-end

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

Page 6: Solr Front-end

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.

Page 7: Solr Front-end

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.

Page 8: Solr Front-end

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.

Page 9: Solr Front-end

Configuring Solr

Page 10: Solr Front-end

Configuring Solr

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

Page 11: Solr Front-end

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.

Page 12: Solr Front-end

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

Page 13: Solr Front-end

Basic Configs

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

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

Page 14: Solr Front-end

Basic Configs - Display Profiles

Primary - How your search results look

Secondary - Download search results

Page 15: Solr Front-end

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

This is very ugly.

Page 16: Solr Front-end

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.

Page 17: Solr Front-end

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.

Page 18: Solr Front-end

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.

Page 19: Solr Front-end

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.

Page 20: Solr Front-end

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.

Page 21: Solr Front-end

Configuring Solr Facets

Example:

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

Page 22: Solr Front-end

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.

Page 23: Solr Front-end

Configuring Solr Facets

● Start typing mods_name_personal_namePart_ms and add the field once complete.

● Click Configure and label the facet Name.

Page 24: Solr Front-end

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.

Page 25: Solr Front-end

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.

Page 26: Solr Front-end

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.

Page 27: Solr Front-end

Solr Metadata

Page 28: Solr Front-end

Solr Views

Page 29: Solr Front-end
Page 30: Solr Front-end