From 1d28da41fb8c1e81cb2825b513eb2344a995f335 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 15 Oct 2014 10:28:44 -0300 Subject: [PATCH] Bug 11232: (followup) Configuration variable for enabling Zebra facets 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/Search.pm | 6 ++++-- debian/templates/koha-conf-site.xml.in | 1 + etc/koha-conf.xml | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 7abe096740..ed9538f2db 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -634,9 +634,11 @@ sub GetFacets { 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 ); diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index 371b1d29d9..1892960758 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -281,6 +281,7 @@ __BIBLIOS_INDEXING_MODE__ __AUTHORITIES_INDEXING_MODE__ /var/lock/koha/__KOHASITE__ + 1 /etc/koha/searchengine/queryparser.yaml diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index 534bd13968..0392fb8943 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -112,6 +112,7 @@ __PAZPAR2_TOGGLE_XML_POST__ __BIB_INDEX_MODE__ __AUTH_INDEX_MODE__ __ZEBRA_LOCK_DIR__ + 1 __KOHA_CONF_DIR__/searchengine/queryparser.yaml -- 2.39.5