Sru: Providing SRU Access to BibClass Collections

From DLXS Documentation

Revision as of 16:03, 14 September 2007 by Cboulay (Talk | contribs)
Jump to: navigation, search

Main Page > Mounting Collections: Class-specific Steps > Mounting a Bib Class Collection > sru: Providing SRU access to BibClass collections


Overview

sru is the CGI program that produces XML responses to SRU requests as dictated by the SRU protocol. Setting up sru will allow federated search engines/clients to search your Bib Class collections. To learn about the SRU protocol go to http://www.loc.gov/standards/sru/

Setup Default Parameters

The SRU protocol needs a default Bib Class collection to search, along with some other default values. During installation you will be prompted for the values of these default parameters, but you can also change them any time in /$DLXSROOT/cgi/s/sru/sru.cfg. Here is a list of the parameters that need to be set up for your particular institution:

  • gDefaultCollection - The collid to search when no x-collid parameter is passed in the searchRetrieve operation. For UM the default is "oaister".
  • gHost - The hosting site. For UM the value is "www.hti.umich.edu".
  • gPort - The port of the site. For UM the value is "620".
  • gDatabase - The name you are giving your SRU repository of data. For UM the value is "dlps".
  • gTitle - A title describing your SRU gateway. For UM the value is "University of Michigan Gateway".
  • gDescription - A description of your gateway. At UM the description is "SRU Gateway to University of Michigan DLPS Collections".

Also, you will need to add the Bib Class collections to the AUTH system for sru, so that this cgi tool can have access to them.

Sample Requests

This implementation of sru just implements the explain operation and the searchRetrieve operation. The explain operation identifies the repository. There are two ways to make an explain request-- one is to not pass any parameters and the other is to pass an explain request. The following two links from UM's implementation demonstrate this:

The other operation is searchRetrieve. This operation is used to request the number of hits for a particular search ( query ), and then retrieve the results from the search. The particular collection to search can be passed in the x-collid parameter. If no x-collid parameter is passed, then the configured default collection is searched. The SRU protocol allows very robust query requests, but it is not mandatory that all these query requests be SRU compliant. For now, we have chosen to implement only level 0 of the SRU CQL language (term-only searches). The following examples from UM show how the searchRetrieve operation can be used to request hits for a particular search, and then retrieve the first 4 records returned by the search:

Top

Personal tools