Table of Contents
The MultiBackend driver allows you to connect a single VuFind instance to multiple ILS backends.
Indexing Your Data
The MultiBackend driver determines which records are associated with which ILS backends by looking for a prefix on ID values. For each set of records, you should use a custom SolrMarc configuration to prepend an identifier onto each record's ID value. The resulting IDs must be in the format prefix.ID, for example:
Record 12345 from library A: instance1.12345
Record 54321 from library B: instance2.54321
The same prefix must be used to identify the sources in the indexing phase as well as in MultiBackend.ini.
Setting Up SolrMarc to Index Multiple Libraries
If you are using SolrMarc to index records, your best bet is to take advantage of its -p switch to specify a properties file at index time. This allows you to use a different configuration file for each library being indexed.
By default, SolrMarc uses $VUFIND_LOCAL_DIR/import/import.properties as its base configuration file. To continue the example from above where you have two libraries called “instance1” and “instance2,” you could copy the import.properties file to $VUFIND_LOCAL_DIR/import/instance1.properties and $VUFIND_LOCAL_DIR/import/instance2.properties.
For the most part, the settings in instance1.properties and instance2.properties files can remain the same as import.properties. Only one critical detail needs to change: solr.indexer.properties, which specifies which MARC mappings should be applied during indexing. By default, it is set like this:
solr.indexer.properties = marc.properties, marc_local.properties
This tells SolrMarc to use the core marc.properties file for defaults, but to override them with customizations in marc_local.properties. You could extend this to:
solr.indexer.properties = marc.properties, marc_local.properties, marc_instance1.properties
in your instance1.properties file, and:
solr.indexer.properties = marc.properties, marc_local.properties, marc_instance2.properties
in your instance2.properties file.
This will tell SolrMarc to add another level of mapping overrides that is specific to each instance. Now, if you have shared customizations that you want to apply to all instances, you can include those in marc_local.properties, but you can also put instance-specific customizations in $VUFIND_LOCAL_DIR/import/marc_instance1.properties and $VUFIND_LOCAL_DIR/import/marc_instance2.properties. For example, marc_instance1.properties could look like this, ensuring that the correct prefix is attached to record IDs:
id = 001, (pattern_map.id_prefix), first pattern_map.id_prefix.pattern_0 = (.+)=>instance1.$1
Once this is all set up, you can simply specify an appropriate configuration file with the -p switch when indexing; e.g.:
./import-marc.sh -p instance1.properties records_from_instance1.mrc
Configuring the Driver
For each individual ILS being connected to VuFind, you will need to set up a separate ILS specific .ini file (e.g. copy Voyager.ini to instance1.ini and Koha.ini to instance2.ini). You will also need to set up a MultiBackend.ini file to specify which of the ID prefixes set up in the previous step maps to which of the individual ILS configurations. Further documentation can be found in all of the relevant .ini files.
For user authentication the MultiILS driver can be used to allow users to log in with a library card of the selected library.
This example makes the following assumptions:
- Local config files reside in local/config/vufind
- Records with prefix “anchor” (example ID: anchor.213) come from a Voyager system with REST APIs available
- Records with prefix “comb” (example ID: comb.3233) come from a Koha system
- Users can authenticate with a library card of either system
The following steps are required:
- Copy config/vufind/VoyagerRestful.ini to local/config/vufind/anchor.ini and modify it according to your environment
- Copy config/vufind/Koha.ini to local/config/vufind/comb.ini and modify it according to your environment
- Modify local/config/vufind/config.ini and set ILS driver to MultiBackend and authentication to MultiILS like this:
[Catalog] driver = "MultiBackend" [Authentication] method = MultiILS
- Copy config/vufind/MultiBackend.ini to local/config/vufind/MultiBackend.ini and set it up to use VoyagerRestful for anchor and Koha for comb:
[Drivers] anchor = VoyagerRestful comb = Koha [Login] default_driver = anchor drivers = anchor drivers = comb