Bug 11910

Summary: Make it possible to add indexes to getIndexes() in Search.pm without having to change source code
Product: Koha Reporter: Barton Chittenden <bartonski>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12216
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

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.
Comment 2 Katrin Fischer 2023-07-09 10:27:50 UTC
I am picking this one out here:

> 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.

I think that would be really useful.