Table of Contents

Hierarchies and Collections

Hierarchies

Some document collections are structured hierarchically. VuFind® offers a mechanism for displaying these hierarchies as a pop-up within search results and as a tab of the record page.

Solr Setup

To display hierarchies, VuFind® needs to be able to find information about document relationships in your Solr index. At index time, you need to populate the following fields in order to use hierarchy functionality:

This optional field is not required, but can be used to enhance some functionality:

VuFind® Configuration

Once the Solr index is populated appropriately, you need to adjust several VuFind® configuration files to make hierarchies visible.

Beginning with version 2.4 it is also possible to use the hierarchy support for simple links between containers and their contents. This is typically useful when the full hierarchy support would be overkill. Here it is assumed that the hierarchy is shallow and there are only containers and their child records (e.g. journal and articles). In practice the simple link support does two things:

  1. Replaces the linking from a child record to container by title with linking by record ID.
  2. Displays the number of child records in the container record page with a link to find them all.

Simple links require only a subset of hierarchy fields:

  1. The container record must have is_hierarchy_id
  2. The child records must have hierarchy_parent_id
  3. Additionally, the child records must have container_title for the link to container to be displayed.
  4. Child records may also have container_reference which is displayed after the link and may include e.g. issue and page number.

If the prerequisites above are fulfilled, the simple links can be enabled by setting simpleContainerLinks to true in [Hierarchy] section of config.ini.

Collections

Once you have hierarchies set up, you have the option of enabling VuFind®'s Collection module. This can be used to provide an alternative to the standard record view for records that are considered “collections”. This allows you to, for example, view and search a list of items below the collection record's position in the hierarchy.

VuFind®'s collection browse mode also gives you a high-level view of all the records configured to be treated as collections.

Configuration

Enabling Collection View

To enable collections, set the collections setting in the [Collections] section of config.ini to true.

Customizing Collection View

The collection view is actually a hybrid between a record view and a search results screen. You can customize this view using recommendation modules just like any other search. The relevant configuration options can be found in the Collection.ini file, which lives in the same place as config.ini.

Additional collection-related options can be found in the [Collections] section of config.ini and are documented there with comments.

Identifying Collections

Further configuration options can be found in your hierarchy driver configuration file (usually HierarchyDefault.ini in the same folder as config.ini). The most important option here is link_type in the [Collections] section. This controls which records are treated as collections rather than flat records. Three options are possible:

Browsing Collections

In addition to the custom collection view, VuFind® also offers a module for browsing through lists of your collections. This can be found at Collections/Home under your VuFind® base URL.

Setting Up Browsing

In order to browse collections, you need to populate the hierarchy_browse field of your Solr index. This field contains a collection title concatenated with a collection ID, with a delimiter in between. The default delimiter is “<html>id}</html>” but this can be configured to a different string in the [Collections] section of config.ini. The exact collection IDs/titles that should be indexed here depends on how you are Identifying Collections. If your collection identifier is “Top” then collection_browse should contain hierarchy_top_id / hierarchy_top_title values; if your collection identifier is “All” then collection_browse should contain hierarchy_parent_id / hierarchy_parent_title values.

Examples:

Collection identifier = “Top” (only top-level collections are treated as “real” collections)

hierarchy_top_id = 1234
hierarchy_top_title = My Collection
hierarchy_browse = My Collection{{{_ID_}}}1234

Collection identifier = “All” (all records with children in the hierarchy are treated as “real” collections)

hierarchy_parent_id = 1234
hierarchy_parent_title = My Collection
hierarchy_browse = My Collection{{{_ID_}}}1234
Browse Types

By default, the collection browse uses Solr faceting to find a list of collections. However, if you have a large number of collections in your index, this may become slow or take up too much memory. In that case, you can switch to using the alphabetical heading browse mechanism instead by changing the browseType setting in the [Collections] section of config.ini to “Alphabetical.” When using this option, be sure to maintain your browse index databases as described on the alphabetical heading browse page.