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.
indexing:hierarchies_and_collections

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
indexing:hierarchies_and_collections [2015/12/14 16:45] – [Configuration] demiankatzindexing:hierarchies_and_collections [2023/11/28 20:13] (current) – [Hierarchies and Collections] demiankatz
Line 1: Line 1:
 ====== Hierarchies and Collections ====== ====== Hierarchies and Collections ======
- 
-// The features described on this page are available starting with VuFind 1.4. // 
  
 ===== Hierarchies ===== ===== 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.+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 ==== ==== 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:+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:
  
-  * **hierarchytype** - The type of hierarchy being used (this triggers loading of a hierarchy driver; it is usually easiest to leave it blank, causing VuFind to default to the driver specified in the [Hierarchy] section of [[:config.ini]]).+  * **hierarchytype** - The type of hierarchy being used (this triggers loading of a hierarchy driver; it is usually easiest to leave it blank, causing VuFind® to default to the driver specified in the [Hierarchy] section of [[configuration:files:config.ini]]).
   * **hierarchy_browse** - Optional, see [[#Setting Up Browsing]] below.   * **hierarchy_browse** - Optional, see [[#Setting Up Browsing]] below.
   * **hierarchy_top_id** - The Solr ID of the record representing the top of the hierarchy containing the current record.   * **hierarchy_top_id** - The Solr ID of the record representing the top of the hierarchy containing the current record.
Line 26: Line 24:
   * **is_hierarchy_id** - If the current record represents a node within a hierarchy, this field should contain the same value as the regular id field.   * **is_hierarchy_id** - If the current record represents a node within a hierarchy, this field should contain the same value as the regular id field.
   * **is_hierarchy_title** - If the current record represents a node within a hierarchy, this field should contain the same value as the regular title field.   * **is_hierarchy_title** - If the current record represents a node within a hierarchy, this field should contain the same value as the regular title field.
-  * **title_in_hierarchy** - Optional, introduced in VuFind 2.3. If a record needs to have a different display title in different collection contexts, this field should contain a number of titles equal to the number of parent collections and in the same order as the hierarchy_parent_id field.+  * **title_in_hierarchy** - Optional, introduced in VuFind® 2.3. If a record needs to have a different display title in different collection contexts, this field should contain a number of titles equal to the number of parent collections and in the same order as the hierarchy_parent_id field
 + 
 +This optional field is not required, but can be used to enhance some functionality: 
 + 
 +  * **hierarchy_all_parents_str_mv** - This should contain every parent collection ID -- hierarchy_top_id, hierarchy_parent_id, and any "breadcrumb trail" in between. If populated, starting with VuFind® 10.0, this can be used to improve "deep searching" behavior in the collection view by turning on the search_container_id_field setting in HierarchyDefault.ini. Note that any field name can be used in the configuration, so this name is just a suggestion.
  
-==== VuFind Configuration ====+==== VuFind® Configuration ====
  
-Once the Solr index is populated appropriately, you need to adjust several VuFind configuration files to make hierarchies visible.+Once the Solr index is populated appropriately, you need to adjust several VuFind® configuration files to make hierarchies visible.
  
-  * In [[:config.ini]], make sure that the [Hierarchy] section contains a driver setting (Default is usually the best option if you want to show trees) and the showTree setting is true. +  * In [[configuration:files:config.ini]], make sure that the [Hierarchy] section contains a driver setting (Default is usually the best option if you want to show trees) and the showTree setting is true. 
-  * In your hierarchy driver configuration file (usually HierarchyDefault.ini in the same directory as [[:config.ini]]), make sure that appropriate values are set.+  * In your hierarchy driver configuration file (usually HierarchyDefault.ini in the same directory as [[configuration:files:config.ini]]), make sure that appropriate values are set.
   * If you are using Solr to construct tree data, you may also want to set up util/createHierarchyTrees.php as a cron job or as part of your index process to ensure that your tree cache is always filled.  This will prevent users from experiencing long waits while trees are constructed on demand.  If using this approach, be sure your HierarchyDefault.ini has an appropriate solrCacheTime value set (probably -1, for no expiration, if you set things up so that the cache is always populated with appropriate data).   * If you are using Solr to construct tree data, you may also want to set up util/createHierarchyTrees.php as a cron job or as part of your index process to ensure that your tree cache is always filled.  This will prevent users from experiencing long waits while trees are constructed on demand.  If using this approach, be sure your HierarchyDefault.ini has an appropriate solrCacheTime value set (probably -1, for no expiration, if you set things up so that the cache is always populated with appropriate data).
-  * You can optionally enable or disable searching within trees (a search causes items within the tree to highlight if they match the query); this is on by default and can be controlled within the [Hierarchy] section of [[:config.ini]].+  * You can optionally enable or disable searching within trees (a search causes items within the tree to highlight if they match the query); this is on by default and can be controlled within the [Hierarchy] section of [[configuration:files:config.ini]].
  
 ===== Simple Links Between Containers and Child Records ===== ===== Simple Links Between Containers and Child Records =====
Line 51: Line 53:
   - Child records may also have container_reference which is displayed after the link and may include e.g. issue and page number.   - 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]].+If the prerequisites above are fulfilled, the simple links can be enabled by setting simpleContainerLinks to true in [Hierarchy] section of [[configuration:files:config.ini]].
  
 ===== Collections ===== ===== 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.+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.+VuFind®'s collection browse mode also gives you a high-level view of all the records configured to be treated as collections.
  
 ==== Configuration ==== ==== Configuration ====
Line 63: Line 65:
 === Enabling Collection View === === Enabling Collection View ===
  
-To enable collections, set the collections setting in the [Collections] section of [[:config.ini]] to true.+To enable collections, set the collections setting in the [Collections] section of [[configuration:files:config.ini]] to true.
  
 === Customizing Collection View === === 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]].+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 [[configuration:files:config.ini]].
  
-Additional collection-related options can be found in the [Collections] section of [[:config.ini]] and are documented there with comments.+Additional collection-related options can be found in the [Collections] section of [[configuration:files:config.ini]] and are documented there with comments.
  
 === Identifying Collections === === 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:+Further configuration options can be found in your hierarchy driver configuration file (usually HierarchyDefault.ini in the same folder as [[configuration:files: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:
  
   * Top - Only records at the top of a hierarchy tree are treated as collections.  All nodes below the top are "flattened" into a single result list within the collection.   * Top - Only records at the top of a hierarchy tree are treated as collections.  All nodes below the top are "flattened" into a single result list within the collection.
   * All - Any record marked as a node within the hierarchy (i.e. with is_hierarchy_id set in the Solr index) will be treated as a collection.  When viewing the collection, only records immediately beneath this node will be visible, allowing a more granular exploration of the hierarchy.   * All - Any record marked as a node within the hierarchy (i.e. with is_hierarchy_id set in the Solr index) will be treated as a collection.  When viewing the collection, only records immediately beneath this node will be visible, allowing a more granular exploration of the hierarchy.
-  * None - This disables collections for all records using this hierarchy driver.  If you only have one hierarchy driver (the most common situation), it is easier to turn off collections globally in [[:config.ini]].  This setting exists in case it is needed in more complex multi-driver scenarios.+  * None - This disables collections for all records using this hierarchy driver.  If you only have one hierarchy driver (the most common situation), it is easier to turn off collections globally in [[configuration:files:config.ini]].  This setting exists in case it is needed in more complex multi-driver scenarios.
  
 === Browsing Collections === === 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.+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 == == 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.+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 [[configuration:files: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: Examples:
Line 102: Line 104:
 == Browse Types == == 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|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|alphabetical heading browse]] page.+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 [[indexing:alphabetical_heading_browse|alphabetical heading browse]] mechanism instead by changing the browseType setting in the [Collections] section of [[configuration:files:config.ini]] to "Alphabetical."  When using this option, be sure to maintain your browse index databases as described on the [[indexing:alphabetical_heading_browse|alphabetical heading browse]] page.
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
indexing/hierarchies_and_collections.1450111543.txt.gz · Last modified: 2015/12/14 16:45 by demiankatz