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:koha

This is an old revision of the document!


How to index Koha with VuFind

This is how one university in Africa set up VuFind to index Koha.

Koha uses an ILS driver to connect the records with their holdings and status information. You still need to manually import the MARC data from Koha, so VuFind has the records. But once those records are there, VuFind can determine the status of the items.

Exporting Records From Koha

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 is), and set the variable that points to the Koha configuration file. They will look something like:

export PERL5LIB=/usr/share/koha/lib:$PERL5LIB
export KOHA_CONF=/etc/koha/sites/library/koha-conf.xml

To do the export, you will want to do something like this (the paths may differ)

/usr/share/koha/intranet/cgi-bin/tools/export.pl --filename=kohabibs.marc

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/install to the vufind/local/install directory. make the changes to this file that you need to

#collection = "collection"
institution = "My University"
#building = "Library A"
id = 999c, first

Koha needs to use the id = 999c for Vufind to properly tie the two together. The id= field is not in every version of the marc_local.properties file, so you may need to add that manually. This is the field that the book IDs are stored in. Koha and VuFind use different fields by default. (vufind = 001, koha = 999c)

Now you are ready to run the import:

./import-marc.sh [directory]/kohabibs.marc

The Koha ILS Driver

You will need to change the vufind/local/config/vufind/config.ini file to have

[Catalog]
driver = "Koha"

This will enable the Koha ILS driver. But you will still need to configure it. Copy the Koha.ini file from vufind/config/vufind/Koha.ini to vufind/local/config/vufind/Koha.ini (from the global directory to the vufind local config directory)

Change your Koha.ini file to reflect your site.

[Catalog]
host        = localhost
port        = 3306
username    = mysqluser
password    = mysqlpass
database    = koha_database
url         = http://library.myuniversity.edu/
[Location_Codes]
AV          = "Audio Visual"
CART        = "Book Cart"
CHILD       = "Children's Area"
DISPLAY     = "On Display"
FIC         = "Fiction"
GEN         = "General Stacks"

The Koha username may not be the mysql root user. It is safest to have an alternate user for such things. This mysql user needs to have access to the Koha database. The mysql password should be the mysql password that corresponds to the mysql username. If you want to test this, from the command line you can run:

mysql -u [mysqluser] -p [kohadatabase]

It will prompt you for the password. If it works, then you are fine. If it fails, then you will need to verify the username / password / database with your system administrator.

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.

Troubleshooting

For Koha exporting troubleshooting, check out the Koha forums.

For MARC import/export, look at the page on marc import/export

There is a page for ILS troubleshooting

indexing/koha.1453300182.txt.gz · Last modified: 2016/01/20 14:29 by demiankatz