Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:koha
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
indexing:koha [2021/02/23 14:57] – [Suppressed Records] demiankatz | indexing:koha [2023/08/28 12:25] – [The Koha ILS Driver] emaijala | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to index Koha with VuFind ====== | ====== How to index Koha with VuFind ====== | ||
- | This is how one university in Africa set up VuFind | + | These are general instructions for setting |
- | Koha uses an [[https:// | + | Koha uses an [[https:// |
- | ===== Exporting Records From Koha ===== | + | VuFind also supports fetching records from Koha using [[indexing: |
- | Koha has a cgi-bin/tools/export.pl file which allows you to export to MARC format. | + | |
- | To run that manually, you will need to set the path for PERL5LIB (or whatever your perl lib variable | + | ===== VuFind Indexing Configuration ===== |
- | < | + | |
- | export | + | Start by configuring indexing settings in VuFind. The default settings contain everything needed |
- | export KOHA_CONF=/etc/koha/sites/library/ | + | |
- | </ | + | There are several ways to index location-related fields. The first one is to put library |
- | To do the export, | + | |
+ | Using the export | ||
+ | These fields can be mapped to VuFind' | ||
+ | |||
+ | Copy your marc_local.properties from $VUFIND_HOME/ | ||
+ | |||
+ | Example settings: | ||
< | < | ||
- | / | + | institution |
+ | building = 952c | ||
+ | collection = 9528 | ||
+ | id = 999c, first | ||
</ | </ | ||
- | ===== Importing Into VuFind ===== | + | The id = 999c is needed for Vufind to find Koha's biblionumbers properly. |
- | Once you have exported | + | |
- | Copy your marc_local.properties from $VUFIND_HOME/ | + | You can also set any of the index fields to static strings if desired, for example: |
+ | < | ||
+ | institution = "City Library" | ||
+ | </code> | ||
+ | |||
+ | ==== Hierarchical Location Facet ==== | ||
+ | |||
+ | You can combine library and location into a [[configuration: | ||
- | Make the changes to this file that you need to | ||
< | < | ||
- | # | + | building |
- | institution | + | building += 952bc, join("/"), (pattern_map.building_1), |
- | # | + | pattern_map.building_0.pattern_0 |
- | id = 999c, first | + | pattern_map.building_1.pattern_0 |
</ | </ | ||
- | Koha needs to use the id = 999c for Vufind to properly tie the two together. | ||
- | Now you are ready to run the import: | + | You'll need to tell VuFind to handle |
< | < | ||
- | ./ | + | [SpecialFacets] |
+ | hierarchical[] = building | ||
+ | |||
+ | [Advanced_Settings] | ||
+ | translated_facets[] = building: | ||
</ | </ | ||
+ | |||
+ | Hierarchical facet values can be translated just like normal facet values, but you need to add translations for the different hierarchy levels. E.g. for library CPL's location FIC, you would add the following translations to $VUFIND_LOCAL_DIR/ | ||
+ | |||
+ | < | ||
+ | 0/CPL/ = " | ||
+ | 1/CPL/FIC/ = " | ||
+ | </ | ||
+ | |||
==== Suppressed Records ==== | ==== Suppressed Records ==== | ||
- | Note: If you want to exclude suppressed records from display in VuFind, you may need to add additional settings to your import configuration. Koha stores suppressed status in MARC field 942, subfield n. A value of " | + | If you want to exclude suppressed records from display in VuFind, you may need to add additional settings to your import configuration. Koha stores suppressed status in MARC field 942, subfield n. A value of " |
< | < | ||
suppressed_str = 942n ? ($n matches " | suppressed_str = 942n ? ($n matches " | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Exporting Records From Koha ===== | ||
+ | |||
+ | Koha has a misc/ | ||
+ | |||
+ | To run the export script, you will need to enter a Koha shell for the instance (< | ||
+ | < | ||
+ | koha-shell < | ||
+ | </ | ||
+ | |||
+ | Alternatively, | ||
+ | < | ||
+ | export PERL5LIB=/ | ||
+ | export KOHA_CONF=/ | ||
+ | </ | ||
+ | |||
+ | To do the export, you will want to do something like this (the paths may differ): | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Importing Into VuFind ===== | ||
+ | |||
+ | Once you have exported the koha records, you will need to import the records into VuFind. | ||
+ | |||
+ | If necessary, transfer the file over so that VuFind can find it. | ||
+ | |||
+ | Now you are ready to run the import: | ||
+ | < | ||
+ | ./ | ||
+ | </ | ||
+ | |||
===== The Koha ILS Driver ===== | ===== The Koha ILS Driver ===== | ||
- | :!: // The example here describes the simple, database-driven Koha driver; newer VuFind releases may include KohaILSDI and/or KohaRest drivers that implement additional functionality using APIs found in newer Koha versions. // | + | :!: // The example here describes the simple, database-driven Koha driver; newer VuFind releases may include KohaILSDI and/or KohaRest drivers that implement additional functionality using APIs found in newer Koha versions. The **KohaRest driver is recommended** as it supports the widest range of functionality and does not require direct database connection. See KohaRest.ini configuration file for more information. // |
You will need to change the $VUFIND_LOCAL_DIR/ | You will need to change the $VUFIND_LOCAL_DIR/ | ||
Line 81: | Line 140: | ||
It will prompt you for the password. | It will prompt you for the password. | ||
- | Once you have your koha.ini file set up, [[administration: | + | Once you have your koha.ini file set up, check to see that your Koha records show up, and that the holdings information shows up. |
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
- | For Koha exporting troubleshooting, | + | For Koha exporting troubleshooting, |
For MARC import/ | For MARC import/ | ||
Line 90: | Line 150: | ||
There is a page for [[https:// | There is a page for [[https:// | ||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
indexing/koha.txt · Last modified: 2023/11/28 19:22 by demiankatz