@@ -, +, @@
for bib
--biblio-idx {dom|grs1}
--auth-idx {dom|grs1}
- Apply the patch
- Build your own packages and install them on a test server
$ koha-create --create-db domtest
- Check there's a file /etc/koha/sites/domtest/zebra-biblios-dom.cfg
- Check that /etc/koha/sites/domtest/koha-conf.xml points to:
* zebra-biblios-dom.cfg (biblioserver section)
* zebra-biblios-dom.cfg (publicserver section)
* zebra-authorities-dom.cfg (authorityserver section)
- Success means the new default is DOM
$ koha-create --create-db --auth-idx grs1 --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx grs1 --biblio-idx dom domtest
$ koha-create --create-db --auth-idx dom --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx dom --biblio-idx dom domtest
- Check the koha-conf.xml file reflects the chosen options.
$ koha-create --help
- It should advertise this addition accordingly.
$ man koha-create
- Man page for koha-create should provide good information on the new switches behaviour
---
debian/docs/koha-create.xml | 16 +++++++++
debian/scripts/koha-create | 45 +++++++++++++++++++++++-
debian/templates/koha-conf-site.xml.in | 6 ++--
debian/templates/zebra-biblios-dom-site.cfg.in | 22 ++++++------
4 files changed, 74 insertions(+), 15 deletions(-)
--- a/debian/docs/koha-create.xml
+++ a/debian/docs/koha-create.xml
@@ -27,6 +27,8 @@
|||
marc21|normarc|unimarc
en|es|fr|nb|ru|uk
+ dom|grs1
+ dom|grs1
/path/to/some.sql
/path/to/config
/path/to/passwd
@@ -109,6 +111,20 @@
+
+
+
+ Specified the desired indexing mode for authority records. Valid options are (default) and .
+
+
+
+
+
+
+ Specified the desired indexing mode for bibliographic records. Valid options are (default) and .
+
+
+
--- a/debian/scripts/koha-create
+++ a/debian/scripts/koha-create
@@ -22,6 +22,7 @@ set -e
usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
[--marcflavor marc21|normarc|unimarc] \
[--zebralang en|es|fr|nb|ru|uk] \
+ [--auth-idx dom|grs1] [--biblio-idx dom|grs1] \
[--defaultsql /path/to/some.sql] \
[--configfile /path/to/config] [--passwdfile /path/to/passwd] \
[--database database] [--adminuser n] instancename"
@@ -45,6 +46,8 @@ generate_config_file() {
-e "s/__ZEBRA_PASS__/$zebrapwd/g" \
-e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
-e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \
+ -e "s/__BIBLIO_INDEXING__/$BIBLIO_INDEXING/g" \
+ -e "s/__AUTHORITY_INDEXING__/$AUTHORITY_INDXING/g" \
-e "s/__DB_NAME__/$mysqldb/g" \
-e "s/__DB_HOST__/$mysqlhost/g" \
-e "s/__DB_USER__/$mysqluser/g" \
@@ -75,6 +78,40 @@ getinstancemysqldatabase() {
xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml"
}
+set_authority_indexing()
+{
+ indexing_mode=$1
+
+ case $indexing_mode in
+ "grs1")
+ AUTHORITY_INDEXING=""
+ ;;
+ "dom")
+ AUTHORITY_INDEXING="-dom"
+ ;;
+ *)
+ die "Error: '$indexing_mode' is not a valid indexing mode for authority records."
+ ;;
+ esac
+}
+
+set_biblio_indexing()
+{
+ indexing_mode=$1
+
+ case $indexing_mode in
+ "grs1")
+ BIBLIO_INDEXING=""
+ ;;
+ "dom")
+ BIBLIO_INDEXING="-dom"
+ ;;
+ *)
+ die "Error: '$indexing_mode' is not a valid indexing mode for bibliographic records."
+ ;;
+ esac
+}
+
# Set defaults and read config file, if it exists.
DOMAIN=""
OPACPORT="80"
@@ -86,6 +123,8 @@ INTRASUFFIX=""
DEFAULTSQL=""
ZEBRA_MARC_FORMAT="marc21"
ZEBRA_LANGUAGE="en"
+BIBLIO_INDEXING="-dom"
+AUTHORITY_INDEXING="-dom"
ADMINUSER="1"
PASSWDFILE="/etc/koha/passwd"
if [ -e /etc/koha/koha-sites.conf ]
@@ -95,7 +134,7 @@ fi
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
-TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,marcflavor:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser: \
+TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser: \
-n "$0" -- "$@"`
# Note the quotes around `$TEMP': they are essential!
@@ -115,6 +154,8 @@ while true ; do
-u|--use-db) op=use ; shift ;;
-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
+ --auth-idx) set_authority_indexing "$2" ; shift 2 ;;
+ --biblio-idx) set_biblio_indexing "$2" ; shift 2 ;;
-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
-f|--configfile) configfile="$2" ; shift 2 ;;
-s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
@@ -261,6 +302,8 @@ eof
# Generate and install Zebra config files.
generate_config_file zebra-biblios-site.cfg.in \
"/etc/koha/sites/$name/zebra-biblios.cfg"
+ generate_config_file zebra-biblios-dom-site.cfg.in \
+ "/etc/koha/sites/$name/zebra-biblios-dom.cfg"
generate_config_file zebra-authorities-site.cfg.in \
"/etc/koha/sites/$name/zebra-authorities.cfg"
generate_config_file zebra-authorities-dom-site.cfg.in \
--- a/debian/templates/koha-conf-site.xml.in
+++ a/debian/templates/koha-conf-site.xml.in
@@ -26,7 +26,7 @@
/var/lib/koha/__KOHASITE__/biblios
- /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg
+ /etc/koha/sites/__KOHASITE__/zebra-biblios__BIBLIO_INDEXING__.cfg
/etc/koha/zebradb/pqf.properties
@@ -102,7 +102,7 @@
/var/lib/koha/__KOHASITE__/authorities
- /etc/koha/sites/__KOHASITE__/zebra-authorities-dom.cfg
+ /etc/koha/sites/__KOHASITE__/zebra-authorities__AUTHORITY_INDEXING__.cfg
/etc/koha/zebradb/pqf.properties
@@ -176,7 +176,7 @@
/var/lib/koha/__KOHASITE__/biblios
- /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg
+ /etc/koha/sites/__KOHASITE__/zebra-biblios__BIBLIO_INDEXING__.cfg
/etc/koha/zebradb/pqf.properties
--- a/debian/templates/zebra-biblios-dom-site.cfg.in
+++ a/debian/templates/zebra-biblios-dom-site.cfg.in
@@ -3,7 +3,7 @@
# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
#
# Where are the config files located?
-profilePath:__ZEBRA_CONF_DIR__/biblios/etc:__ZEBRA_CONF_DIR__/etc:__ZEBRA_CONF_DIR__/marc_defs/__ZEBRA_MARC_FORMAT__/biblios:__ZEBRA_CONF_DIR__/lang_defs/__ZEBRA_LANGUAGE__:__ZEBRA_CONF_DIR__/xsl
+profilePath:/etc/koha/zebradb/biblios/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/__ZEBRA_MARC_FORMAT__/biblios:/etc/koha/zebradb/lang_defs/__ZEBRA_LANGUAGE__:/etc/koha/zebradb/xsl
# modulePath - where to look for loadable zebra modules
modulePath: /usr/lib/idzebra-2.0/modules
@@ -21,9 +21,9 @@ attset: gils.att
# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
# http://www.indexdata.dk/zebra/doc/grs.tkl
-recordtype: dom.__ZEBRA_CONF_DIR__/biblios/etc/dom-config.xml
-marcxml.recordtype: dom.__ZEBRA_CONF_DIR__/biblios/etc/dom-config.xml
-iso2709.recordtype: dom.__ZEBRA_CONF_DIR__/biblios/etc/dom-config-marc.xml
+recordtype: dom./etc/koha/zebradb/biblios/etc/dom-config.xml
+marcxml.recordtype: dom./etc/koha/zebradb/biblios/etc/dom-config.xml
+iso2709.recordtype: dom./etc/koha/zebradb/biblios/etc/dom-config-marc.xml
recordId: (bib1,Local-number)
storeKeys:1
@@ -31,18 +31,18 @@ storeData:1
# Lock File Area
-lockDir: __ZEBRA_LOCK_DIR__/biblios
+lockDir: /var/lock/koha/__KOHASITE__/biblios
perm.anonymous:ar
-perm.__ZEBRA_USER__:rw
-passwd: __ZEBRA_CONF_DIR__/etc/passwd
-register: __ZEBRA_DATA_DIR__/biblios/register:20G
-shadow: __ZEBRA_DATA_DIR__/biblios/shadow:20G
+perm.kohauser:rw
+passwd: /etc/koha/sites/__KOHASITE__/zebra.passwd
+register: /var/lib/koha/__KOHASITE__/biblios/register:20G
+shadow: /var/lib/koha/__KOHASITE__/biblios/shadow:20G
# Temp File area for result sets
-setTmpDir: __ZEBRA_DATA_DIR__/biblios/tmp
+setTmpDir: /var/lib/koha/__KOHASITE__/biblios/tmp
# Temp File area for index program
-keyTmpDir: __ZEBRA_DATA_DIR__/biblios/key
+keyTmpDir: /var/lib/koha/__KOHASITE__/biblios/key
# Approx. Memory usage during indexing
memMax: 50M
--