About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:course_reserves

This is an old revision of the document!


Course Reserves

Academic libraries often need to list resources held on reserve for particular courses, departments and instructors. VuFind® supports this need in multiple ways.

Regardless of how reserves are configured, they can be accessed through the “/Search/Reserves” action beneath your base VuFind® URL.

Driver-Based Reserves (Default)

If your ILS driver implements the findReserves() method, VuFind® can load course reserves information in real-time from the ILS.

Solr-Based Reserves

Starting with VuFind® 1.3, you can configure the software to use a Solr index for course reserves searching instead of the ILS driver. This offers greater flexibility and a more attractive user interface. To configure:

1.) Edit the [Reserves] section of config.ini and set search_enabled to true.

2.) Turn on the reserves Solr core by editing solr/solr.xml to uncomment the appropriate line and then restarting Solr. :!: This step is not necessary in VuFind® 3.0 or newer.

3.) Load data into the index by running the util/index_reserves.php tool to extract it from your ILS. ILS extraction requires support in the ILS driver. Starting with VuFind® 1.4, you can also load data from a CSV file. See index_reserves.php parameters below for details.

index_reserves.php command-line parameters (VuFind® 1.4 or newer)

Course reserves index builder

If run with no options, this will attempt to load data from your ILS.

Switches may be used to index from delimited files instead:

 -f [filename] loads a file (may be repeated for multiple files)
 -d [delimiter] specifies a delimiter (comma is default)
 -t [template] provides a template showing where important values
     can be found within the file.  The template is a comma-
     separated list of values.  Choose from:
          BIB_ID     - bibliographic ID
          COURSE     - course name
          DEPARTMENT - department name
          INSTRUCTOR - instructor name
          SKIP       - ignore data in this position
     Default template is BIB_ID,COURSE,INSTRUCTOR,DEPARTMENT
 -h or -? display this help information.

Multiple reserve Solr cores

If your Solr installation has more than one core for reserves (for instance, your Solr service is used by more than one VuFind® installation), you can change the name of the reserves core.

1.) Create module/<your_module>/src/<your_module>/Search/Factory/SolrReservesBackendFactory.php and extend the parent class. Change $this→solrCore to the name of your reserves Solr core:

<?php
namespace <your_module>\Search\Factory;

class SolrReservesBackendFactory extends \VuFind\Search\Factory\SolrReservesBackendFactory
{
    public function __construct()
    {
        parent::__construct();
        $this->solrCore = '<your-library>_reserves';
    }
}

2.) Add a factory plugin to the new factory in your module's “module.config.php”

'vufind' =>
  array(
    'search_backend' =>
      array(
        'factories' =>
          array(
            'SolrReserves' => '<your_module>\Search\Factory\SolrReservesBackendFactory',
          )
      )
  )
configuration/course_reserves.1699555372.txt.gz · Last modified: 2023/11/09 18:42 by demiankatz