View | Details | Raw Unified | Return to bug 8507
Collapse All | Expand All

(-)a/debian/docs/koha-create.xml (+16 lines)
Lines 27-32 Link Here
27
      <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
27
      <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
28
      <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
28
      <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
29
      <arg><option>--zebralang</option> en|es|fr|nb|ru|uk</arg>
29
      <arg><option>--zebralang</option> en|es|fr|nb|ru|uk</arg>
30
      <arg><option>--auth-idx</option> dom|grs1</arg>
31
      <arg><option>--biblio-idx</option> dom|grs1</arg>
30
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
32
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
31
      <arg><option>--configfile</option> /path/to/config</arg>
33
      <arg><option>--configfile</option> /path/to/config</arg>
32
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
34
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
Lines 109-114 Link Here
109
      </listitem>
111
      </listitem>
110
    </varlistentry>
112
    </varlistentry>
111
113
114
    <varlistentry>
115
      <term><option>--auth-idx</option></term>
116
      <listitem>
117
        <para>Specified the desired indexing mode for authority records. Valid options are <option>dom</option> (default) and <option>grs1</option>.</para>
118
      </listitem>
119
    </varlistentry>
120
121
    <varlistentry>
122
      <term><option>--biblio-idx</option></term>
123
      <listitem>
124
        <para>Specified the desired indexing mode for bibliographic records. Valid options are <option>dom</option> (default) and <option>grs1</option>.</para>
125
      </listitem>
126
    </varlistentry>
127
112
  </variablelist>
128
  </variablelist>
113
  </refsect1>
129
  </refsect1>
114
130
(-)a/debian/scripts/koha-create (-1 / +44 lines)
Lines 22-27 set -e Link Here
22
usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
22
usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
23
    [--marcflavor marc21|normarc|unimarc] \
23
    [--marcflavor marc21|normarc|unimarc] \
24
    [--zebralang en|es|fr|nb|ru|uk] \
24
    [--zebralang en|es|fr|nb|ru|uk] \
25
    [--auth-idx dom|grs1] [--biblio-idx dom|grs1] \
25
    [--defaultsql /path/to/some.sql] \
26
    [--defaultsql /path/to/some.sql] \
26
    [--configfile /path/to/config] [--passwdfile /path/to/passwd] \
27
    [--configfile /path/to/config] [--passwdfile /path/to/passwd] \
27
    [--database database] [--adminuser n] instancename"
28
    [--database database] [--adminuser n] instancename"
Lines 45-50 generate_config_file() { Link Here
45
        -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
46
        -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
46
        -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
47
        -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
47
        -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \
48
        -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \
49
        -e "s/__BIBLIO_INDEXING__/$BIBLIO_INDEXING/g" \
50
        -e "s/__AUTHORITY_INDEXING__/$AUTHORITY_INDEXING/g" \
48
        -e "s/__DB_NAME__/$mysqldb/g" \
51
        -e "s/__DB_NAME__/$mysqldb/g" \
49
        -e "s/__DB_HOST__/$mysqlhost/g" \
52
        -e "s/__DB_HOST__/$mysqlhost/g" \
50
        -e "s/__DB_USER__/$mysqluser/g" \
53
        -e "s/__DB_USER__/$mysqluser/g" \
Lines 75-80 getinstancemysqldatabase() { Link Here
75
    xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml"
78
    xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml"
76
}
79
}
77
80
81
set_authority_indexing()
82
{
83
    indexing_mode=$1
84
85
    case $indexing_mode in
86
        "grs1")
87
            AUTHORITY_INDEXING=""
88
            ;;
89
        "dom")
90
            AUTHORITY_INDEXING="-dom"
91
            ;;
92
        *)
93
            die "Error: '$indexing_mode' is not a valid indexing mode for authority records."
94
            ;;
95
    esac
96
}
97
98
set_biblio_indexing()
99
{
100
    indexing_mode=$1
101
102
    case $indexing_mode in
103
        "grs1")
104
            BIBLIO_INDEXING=""
105
            ;;
106
        "dom")
107
            BIBLIO_INDEXING="-dom"
108
            ;;
109
        *)
110
            die "Error: '$indexing_mode' is not a valid indexing mode for bibliographic records."
111
            ;;
112
    esac
113
}
114
78
# Set defaults and read config file, if it exists.
115
# Set defaults and read config file, if it exists.
79
DOMAIN=""
116
DOMAIN=""
80
OPACPORT="80"
117
OPACPORT="80"
Lines 86-91 INTRASUFFIX="" Link Here
86
DEFAULTSQL=""
123
DEFAULTSQL=""
87
ZEBRA_MARC_FORMAT="marc21"
124
ZEBRA_MARC_FORMAT="marc21"
88
ZEBRA_LANGUAGE="en"
125
ZEBRA_LANGUAGE="en"
126
BIBLIO_INDEXING="-dom"
127
AUTHORITY_INDEXING="-dom"
89
ADMINUSER="1"
128
ADMINUSER="1"
90
PASSWDFILE="/etc/koha/passwd"
129
PASSWDFILE="/etc/koha/passwd"
91
if [ -e /etc/koha/koha-sites.conf ]
130
if [ -e /etc/koha/koha-sites.conf ]
Lines 95-101 fi Link Here
95
134
96
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
135
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
97
136
98
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: \
137
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: \
99
     -n "$0" -- "$@"`
138
     -n "$0" -- "$@"`
100
139
101
# Note the quotes around `$TEMP': they are essential!
140
# Note the quotes around `$TEMP': they are essential!
Lines 115-120 while true ; do Link Here
115
        -u|--use-db) op=use ; shift ;;
154
        -u|--use-db) op=use ; shift ;;
116
		-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
155
		-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
117
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
156
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
157
		--auth-idx) set_authority_indexing "$2" ; shift 2 ;;
158
		--biblio-idx) set_biblio_indexing "$2" ; shift 2 ;;
118
		-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
159
		-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
119
		-f|--configfile) configfile="$2" ; shift 2 ;;
160
		-f|--configfile) configfile="$2" ; shift 2 ;;
120
        -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
161
        -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
Lines 261-266 eof Link Here
261
    # Generate and install Zebra config files.
302
    # Generate and install Zebra config files.
262
    generate_config_file zebra-biblios-site.cfg.in \
303
    generate_config_file zebra-biblios-site.cfg.in \
263
        "/etc/koha/sites/$name/zebra-biblios.cfg"
304
        "/etc/koha/sites/$name/zebra-biblios.cfg"
305
    generate_config_file zebra-biblios-dom-site.cfg.in \
306
        "/etc/koha/sites/$name/zebra-biblios-dom.cfg"
264
    generate_config_file zebra-authorities-site.cfg.in \
307
    generate_config_file zebra-authorities-site.cfg.in \
265
        "/etc/koha/sites/$name/zebra-authorities.cfg"
308
        "/etc/koha/sites/$name/zebra-authorities.cfg"
266
    generate_config_file zebra-authorities-dom-site.cfg.in \
309
    generate_config_file zebra-authorities-dom-site.cfg.in \
(-)a/debian/templates/koha-conf-site.xml.in (-3 / +3 lines)
Lines 26-32 Link Here
26
<!-- BIBLIOGRAPHIC RECORDS -->
26
<!-- BIBLIOGRAPHIC RECORDS -->
27
<server id="biblioserver"  listenref="biblioserver">
27
<server id="biblioserver"  listenref="biblioserver">
28
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
28
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
29
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
29
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios__BIBLIO_INDEXING__.cfg</config>
30
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
30
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
31
     <retrievalinfo>
31
     <retrievalinfo>
32
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
32
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
Lines 102-108 Link Here
102
<!-- AUTHORITY RECORDS -->
102
<!-- AUTHORITY RECORDS -->
103
<server id="authorityserver"  listenref="authorityserver" >
103
<server id="authorityserver"  listenref="authorityserver" >
104
    <directory>/var/lib/koha/__KOHASITE__/authorities</directory>
104
    <directory>/var/lib/koha/__KOHASITE__/authorities</directory>
105
    <config>/etc/koha/sites/__KOHASITE__/zebra-authorities-dom.cfg</config>
105
    <config>/etc/koha/sites/__KOHASITE__/zebra-authorities__AUTHORITY_INDEXING__.cfg</config>
106
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
106
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
107
    <xi:include href="/etc/koha/__ZEBRA_MARC_FORMAT__-retrieval-info-auth-dom.xml"
107
    <xi:include href="/etc/koha/__ZEBRA_MARC_FORMAT__-retrieval-info-auth-dom.xml"
108
                xmlns:xi="http://www.w3.org/2001/XInclude">
108
                xmlns:xi="http://www.w3.org/2001/XInclude">
Lines 176-182 Link Here
176
176
177
<server id="publicserver"  listenref="publicserver">
177
<server id="publicserver"  listenref="publicserver">
178
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
178
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
179
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
179
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios__BIBLIO_INDEXING__.cfg</config>
180
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
180
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
181
     <retrievalinfo>
181
     <retrievalinfo>
182
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
182
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
(-)a/debian/templates/zebra-biblios-dom-site.cfg.in (-12 / +11 lines)
Lines 3-9 Link Here
3
# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
3
# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
4
#
4
#
5
# Where are the config files located?
5
# Where are the config files located?
6
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
6
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
7
# modulePath - where to look for loadable zebra modules
7
# modulePath - where to look for loadable zebra modules
8
modulePath: /usr/lib/idzebra-2.0/modules
8
modulePath: /usr/lib/idzebra-2.0/modules
9
9
Lines 21-29 attset: gils.att Link Here
21
# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
21
# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
22
# http://www.indexdata.dk/zebra/doc/grs.tkl
22
# http://www.indexdata.dk/zebra/doc/grs.tkl
23
23
24
recordtype: dom.__ZEBRA_CONF_DIR__/biblios/etc/dom-config.xml
24
recordtype: dom./etc/koha/zebradb/biblios/etc/dom-config.xml
25
marcxml.recordtype: dom.__ZEBRA_CONF_DIR__/biblios/etc/dom-config.xml
25
marcxml.recordtype: dom./etc/koha/zebradb/biblios/etc/dom-config.xml
26
iso2709.recordtype: dom.__ZEBRA_CONF_DIR__/biblios/etc/dom-config-marc.xml
26
iso2709.recordtype: dom./etc/koha/zebradb/biblios/etc/dom-config-marc.xml
27
27
28
recordId: (bib1,Local-number)
28
recordId: (bib1,Local-number)
29
storeKeys:1
29
storeKeys:1
Lines 31-48 storeData:1 Link Here
31
31
32
32
33
# Lock File Area
33
# Lock File Area
34
lockDir: __ZEBRA_LOCK_DIR__/biblios
34
lockDir: /var/lock/koha/__KOHASITE__/biblios
35
perm.anonymous:ar
35
perm.anonymous:ar
36
perm.__ZEBRA_USER__:rw
36
perm.kohauser:rw
37
passwd: __ZEBRA_CONF_DIR__/etc/passwd
37
passwd: /etc/koha/sites/__KOHASITE__/zebra.passwd
38
register: __ZEBRA_DATA_DIR__/biblios/register:20G
38
register: /var/lib/koha/__KOHASITE__/biblios/register:20G
39
shadow: __ZEBRA_DATA_DIR__/biblios/shadow:20G
39
shadow: /var/lib/koha/__KOHASITE__/biblios/shadow:20G
40
40
41
# Temp File area for result sets
41
# Temp File area for result sets
42
setTmpDir: __ZEBRA_DATA_DIR__/biblios/tmp
42
setTmpDir: /var/lib/koha/__KOHASITE__/biblios/tmp
43
43
44
# Temp File area for index program
44
# Temp File area for index program
45
keyTmpDir: __ZEBRA_DATA_DIR__/biblios/key
45
keyTmpDir: /var/lib/koha/__KOHASITE__/biblios/key
46
46
47
# Approx. Memory usage during indexing
47
# Approx. Memory usage during indexing
48
memMax: 50M
48
memMax: 50M
49
- 

Return to bug 8507