diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh index 6e189b6c94..c6f79b4933 100755 --- a/debian/scripts/koha-functions.sh +++ b/debian/scripts/koha-functions.sh @@ -254,6 +254,17 @@ get_loglevels() fi } +get_max_record_size() +{ + local instancename=$1 + local retval=$(xmlstarlet sel -t -v 'yazgfs/config/zebra_max_record_size' /etc/koha/sites/$instancename/koha-conf.xml) + if [ "$retval" != "" ]; then + echo "$retval" + else + echo "1024" + fi +} + get_tmpdir() { if [ "$TMPDIR" != "" ]; then diff --git a/debian/scripts/koha-zebra b/debian/scripts/koha-zebra index f6d2268c7e..0bd11aa7bc 100755 --- a/debian/scripts/koha-zebra +++ b/debian/scripts/koha-zebra @@ -61,6 +61,7 @@ start_zebra() # get zebra log levels from koha-conf.xml local loglevels=$(get_loglevels ${name}) + local max_record_size=$(get_max_record_size ${name}) if ! is_zebra_running $name; then @@ -76,6 +77,7 @@ start_zebra() --user=${name}-koha.${name}-koha" ZEBRA_PARAMS="-v $loglevels \ + -k $max_record_size \ -f /etc/koha/sites/${name}/koha-conf.xml" [ "$verbose" != "no" ] && \ diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index 9b11c714b4..844758e3fd 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -283,6 +283,7 @@ __END_SRU_PUBLICSERVER__ __AUTHORITIES_INDEXING_MODE__ /var/lock/koha/__KOHASITE__ 1 + 1024 /etc/koha/searchengine/queryparser.yaml __KOHA_CONF_DIR__/log4perl.conf