Making more indexes searchable with Zebra SRU

From Koha Wiki

Jump to: navigation, search
Home > Documentation
Home > Documentation
Tips & Tricks > Tips & Tricks/Customising Notices and Slips > Tips & Tricks

Which indexes are searchable from SRU is governed by the config file etc/zebradb/ Initially the searchable indexes is somewhat limited, so you might want to add some more.

Let's say you are using MARC21 and want to be able to search for the values in MARC field 952$y - "Koha item type". There are three files you need to look at:


etc/zebradb/marc_defs/marc21/biblios/record.abs (Use the file that is appropriate for your MARC dialect!)

This file says in which index Zebra should index 952$y:

melm 952$y      itype:w,itype:p

The name of the Zebra index is itype.



Now we look for itype in bib1.att and find this:

att 8031    itype

So the information from 952$y is now in bib1 attribute 8031.


We look for 8031 in, but it is nowhere to be found! If we want to be able to search for the information from 952$y available for searching from SRU, we need to edit Add something like this under the other index.dc.* entries:

index.dc.kohaitemtype   = 1=8031

(Putting this into the dc "namspace" might not be a good idea, it might be better to define a new "namespace" called local or something similar, but I have not actually tested that...)

Now restart Zebra:

sudo /etc/init.d/koha-zebra-daemon restart

And you should be able to search on the new index, like this:

The process will be similar for other MARC fields and subfields.

Personal tools