Bug 11910 - Make it possible to add indexes to getIndexes() in Search.pm without having to change source code
Summary: Make it possible to add indexes to getIndexes() in Search.pm without having ...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-07 23:09 UTC by Barton Chittenden
Modified: 2023-07-09 10:27 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

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