This patch adds a variable to koha-conf.xml controlling the use of Zebra facets.
Usage:
- use_zebra_facets = 1 | 0
Zebra facets work only on DOM.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
my $rs = shift;
my $facets;
- my $index_mode = C4::Context->config('zebra_auth_index_mode') // 'dom';
+ my $indexing_mode = C4::Context->config('zebra_bib_index_mode') // 'dom';
+ my $use_zebra_facets = C4::Context->config('use_zebra_facets') // 0;
- if ( $index_mode eq 'dom' ) {
+ if ( $indexing_mode eq 'dom' &&
+ $use_zebra_facets ) {
$facets = _get_facets_from_zebra( $rs );
} else {
$facets = _get_facets_from_records( $rs );
<zebra_bib_index_mode>__BIBLIOS_INDEXING_MODE__</zebra_bib_index_mode>
<zebra_auth_index_mode>__AUTHORITIES_INDEXING_MODE__</zebra_auth_index_mode>
<zebra_lockdir>/var/lock/koha/__KOHASITE__</zebra_lockdir>
+ <use_zebra_facets>1</use_zebra_facets>
<queryparser_config>/etc/koha/searchengine/queryparser.yaml</queryparser_config>
</config>
<zebra_bib_index_mode>__BIB_INDEX_MODE__</zebra_bib_index_mode>
<zebra_auth_index_mode>__AUTH_INDEX_MODE__</zebra_auth_index_mode>
<zebra_lockdir>__ZEBRA_LOCK_DIR__</zebra_lockdir>
+ <use_zebra_facets>1</use_zebra_facets>
<queryparser_config>__KOHA_CONF_DIR__/searchengine/queryparser.yaml</queryparser_config>
<!-- true type font mapping accoding to type from $font_types in C4/Creators/Lib.pm -->