Bug 11910 - Adding a zebra index should be a configuration change.
Summary: Adding a zebra index should be a configuration change.
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
Depends on:
Reported: 2014-03-07 23:09 UTC by Barton Chittenden
Modified: 2014-05-08 15:21 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2014-03-07 23:09:54 UTC
There are several web pages documenting how to add a zebra index to koha, e.g. http://wiki.koha-community.org/wiki/MRenvoize/zebra

Unfortunately, these changes must be made either to configuration files which are part of the Koha distribution (e.g. bib1.att, record.abs, ccl.properties and pqf.properties.) or to C4::Search.pm. As such, adding zebra indexes at a package site risks losing modifications upon upgrade.

I suggest that the files 

- bib1.att
- record.abs
- ccl.properties
- pqf.properties

As well as any files required for DOM indexing be placed in a configuration directory, e.g. /etc/koha/sites/* or $HOME/koha-dev/etc. 

In order to be searchable, the index name must be added to  @indexes in C4::Search.pm::getIndexes().

At the very least, there should be a way of adding extra indexes to the arrayref returned by getIndexes() without editing source code.
Comment 1 Martin Renvoize 2014-05-08 15:21:39 UTC
I've just opened a bug which is a partial duplicate of this one: Bug 12216

It only accounts for the zebra config files being over-ridden on a per instance basis, so I'll leave this bug open as a place holder for work on re-factoring Search.pm slightly to allow for customisation of the indexes array.