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 revision | ||
indexing:koha [2016/01/20 14:29] – [How to index Koha with VuFind] demiankatz | indexing:koha [2023/11/28 19:22] (current) – demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to index Koha with VuFind | + | ====== How to index Koha with VuFind® |
- | This is how one university | + | These are general instructions for setting up indexing of bibliographic records from Koha into VuFind®' |
+ | |||
+ | Koha uses an [[https:// | ||
+ | |||
+ | VuFind® also supports fetching records from Koha using [[indexing: | ||
+ | |||
+ | ===== VuFind® Indexing Configuration ===== | ||
+ | |||
+ | Start by configuring indexing settings in VuFind®. The default settings contain everything needed for a basic setup apart from location-related fields. | ||
+ | |||
+ | There are several ways to index location-related fields. The first one is to put library and location to separate fields, but also a single hierarchical facet can be specified as shown further below. | ||
+ | |||
+ | Using the export command described below, Koha will include MARC field 952 for each item (see [[https:// | ||
+ | These fields can be mapped to VuFind®' | ||
+ | |||
+ | Copy your marc_local.properties from $VUFIND_HOME/ | ||
+ | |||
+ | Example settings: | ||
+ | < | ||
+ | institution = 952b | ||
+ | building = 952c | ||
+ | collection = 9528 | ||
+ | id = 999c, first | ||
+ | </ | ||
+ | |||
+ | The id = 999c is needed for Vufind to find Koha's biblionumbers properly. | ||
+ | |||
+ | You can also set any of the index fields to static strings if desired, for example: | ||
+ | < | ||
+ | institution = "City Library" | ||
+ | </ | ||
+ | |||
+ | ==== Hierarchical Location Facet ==== | ||
+ | |||
+ | You can combine library and location into a [[configuration: | ||
+ | |||
+ | < | ||
+ | building = 952b, (pattern_map.building_0), | ||
+ | building += 952bc, join("/" | ||
+ | pattern_map.building_0.pattern_0 = (.+)=> | ||
+ | pattern_map.building_1.pattern_0 = (.+)=> | ||
+ | </ | ||
+ | |||
+ | You'll need to tell VuFind® to handle the building field as a hierarchical one in $VUFIND_LOCAL_DIR/ | ||
+ | |||
+ | < | ||
+ | [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 ==== | ||
+ | |||
+ | If you want to exclude suppressed records from display in VuFind®, you may need to add additional settings to your import configuration. | ||
+ | |||
+ | < | ||
+ | suppressed_str = 942n ? ($n matches " | ||
+ | </ | ||
- | Koha uses an [[https:// | ||
===== Exporting Records From Koha ===== | ===== Exporting Records From Koha ===== | ||
- | Koha has a cgi-bin/ | ||
- | To run that manually, you will need to set the path for PERL5LIB (or whatever your perl lib variable is), and set the variable that points to the Koha configuration file. They will look something like: | + | 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 PERL5LIB=/ | ||
- | export KOHA_CONF=/ | + | export KOHA_CONF=/ |
</ | </ | ||
- | To do the export, you will want to do something like this (the paths may differ) | + | |
+ | 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. | ||
- | Copy your marc_local.properties from vufind/ | + | ===== Importing Into VuFind® ===== |
- | make the changes to this file that you need to | + | |
- | < | + | Once you have exported |
- | # | + | |
- | institution | + | If necessary, transfer |
- | # | + | |
- | id = 999c, first | + | |
- | </ | + | |
- | Koha needs to use the id = 999c for Vufind | + | |
Now you are ready to run the import: | Now you are ready to run the import: | ||
Line 35: | Line 102: | ||
./ | ./ | ||
</ | </ | ||
+ | |||
===== The Koha ILS Driver ===== | ===== The Koha ILS Driver ===== | ||
- | You will need to change the vufind/ | + | |
+ | :!: // 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/ | ||
< | < | ||
[Catalog] | [Catalog] | ||
Line 43: | Line 114: | ||
</ | </ | ||
- | This will enable the Koha ILS driver. | + | This will enable the Koha ILS driver. |
Change your Koha.ini file to reflect your site. | Change your Koha.ini file to reflect your site. | ||
Line 62: | Line 133: | ||
GEN = " | GEN = " | ||
</ | </ | ||
- | The Koha username may not be the mysql root user. It is safest to have an alternate user for such things. | + | The Koha username may not be the MySQL root user. It is safest to have an alternate user for such things. |
- | The mysql password should be the mysql password that corresponds to the mysql username. | + | The MySQL password should be the MySQL password that corresponds to the MySQL username. |
< | < | ||
mysql -u [mysqluser] -p [kohadatabase] | mysql -u [mysqluser] -p [kohadatabase] | ||
Line 69: | 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, restart vufind and check to see that your Koha records show up, and that the holdings information shows up. | + | 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 78: | 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