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

(-)a/Makefile.PL (-3 / +19 lines)
Lines 410-415 my %config_defaults = ( Link Here
410
  'AUTH_INDEX_MODE'   => 'dom',
410
  'AUTH_INDEX_MODE'   => 'dom',
411
  'ZEBRA_MARC_FORMAT' => 'marc21',
411
  'ZEBRA_MARC_FORMAT' => 'marc21',
412
  'ZEBRA_LANGUAGE'    => 'en',
412
  'ZEBRA_LANGUAGE'    => 'en',
413
  'ZEBRA_TOKENIZER'   => 'chr',
413
  'ZEBRA_USER'        => 'kohauser',
414
  'ZEBRA_USER'        => 'kohauser',
414
  'ZEBRA_PASS'        => 'zebrastripes',
415
  'ZEBRA_PASS'        => 'zebrastripes',
415
  'ZEBRA_SRU_HOST'    => 'localhost',
416
  'ZEBRA_SRU_HOST'    => 'localhost',
Lines 461-466 my %valid_config_values = ( Link Here
461
  'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 },
462
  'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 },
462
  'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
463
  'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
463
  'ZEBRA_LANGUAGE'    => { 'en' => 1, 'fr' => 1, 'nb' => 1 }, # FIXME should generate from contents of distribution
464
  'ZEBRA_LANGUAGE'    => { 'en' => 1, 'fr' => 1, 'nb' => 1 }, # FIXME should generate from contents of distribution
465
  'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
464
  'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
466
  'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
465
  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
467
  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
466
);
468
);
Lines 487-497 my $pl_files = { Link Here
487
      'rewrite-config.PL' => [
489
      'rewrite-config.PL' => [
488
         'blib/KOHA_CONF_DIR/koha-conf.xml',
490
         'blib/KOHA_CONF_DIR/koha-conf.xml',
489
         'blib/KOHA_CONF_DIR/koha-httpd.conf',
491
         'blib/KOHA_CONF_DIR/koha-httpd.conf',
492
         'blib/ZEBRA_CONF_DIR/etc/default.idx',
490
         'blib/MISC_DIR/koha-install-log'
493
         'blib/MISC_DIR/koha-install-log'
491
         ],
494
         ],
492
	  'fix-perl-path.PL' => [	# this script ensures the correct shebang line for the platform installed on...
495
	  'fix-perl-path.PL' => [	# this script ensures the correct shebang line for the platform installed on...
493
		 'blib'
496
		 'blib'
494
		 ]
497
		 ],
495
};
498
};
496
499
497
if ($config{'INSTALL_ZEBRA'} eq "yes") {
500
if ($config{'INSTALL_ZEBRA'} eq "yes") {
Lines 528-533 if ($config{'INSTALL_MODE'} ne "dev") { Link Here
528
    );
531
    );
529
}
532
}
530
533
534
$config{ZEBRA_TOKENIZER_STMT} = $config{ZEBRA_TOKENIZER} eq 'icu'
535
    ? 'icuchain words-icu.xml'
536
    : 'charmap word-phrase-utf.chr';
537
531
my %test_suite_override_dirs = (
538
my %test_suite_override_dirs = (
532
    KOHA_CONF_DIR  => ['etc'],
539
    KOHA_CONF_DIR  => ['etc'],
533
    ZEBRA_CONF_DIR => ['etc', 'zebradb'],
540
    ZEBRA_CONF_DIR => ['etc', 'zebradb'],
Lines 918-925 Since you've chosen to use Zebra with Koha, Link Here
918
you must specify the primary MARC format of the
925
you must specify the primary MARC format of the
919
records to be indexed by Zebra.
926
records to be indexed by Zebra.
920
927
921
Koha provides Zebra configuration files for MARC 21
928
Koha provides Zebra configuration files for MARC21,
922
and UNIMARC.
929
NORMARC and UNIMARC.
923
930
924
MARC format for Zebra indexing);
931
MARC format for Zebra indexing);
925
        $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);
932
        $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);
Lines 947-952 Authorities indexing mode); Link Here
947
        $config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values);
954
        $config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values);
948
955
949
        $msg = q(
956
        $msg = q(
957
Zebra has two methods to perform records tokenization
958
and characters normalization: CHR and ICU. ICU is
959
recommended for catalogs containing non-Latin
960
characters.);
961
962
        $msg .= _add_valid_values_disp('ZEBRA_TOKENIZER', $valid_values);
963
        $config{'ZEBRA_TOKENIZER'} = _get_value('ZEBRA_TOKENIZER', $msg, $defaults->{'ZEBRA_TOKENIZER'}, $valid_values, $install_log_values);
964
965
        $msg = q(
950
Please specify Zebra database user);
966
Please specify Zebra database user);
951
        $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values);
967
        $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values);
952
968
(-)a/etc/zebradb/etc/default.idx (-3 / +2 lines)
Lines 10-25 completeness 0 Link Here
10
position 1
10
position 1
11
alwaysmatches 1
11
alwaysmatches 1
12
firstinfield 1
12
firstinfield 1
13
charmap word-phrase-utf.chr
13
__ZEBRA_TOKENIZER_STMT__
14
#firstinfield 1
15
14
16
# Phrase index
15
# Phrase index
17
# Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
16
# Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
18
# and structure is word/phrase/word-list/free-form-text/document-text
17
# and structure is word/phrase/word-list/free-form-text/document-text
19
index p
18
index p
20
completeness 1
19
completeness 1
21
charmap word-phrase-utf.chr
22
firstinfield 1
20
firstinfield 1
21
__ZEBRA_TOKENIZER_STMT__
23
22
24
# URX (URL) index
23
# URX (URL) index
25
# Used if structure=urx (@attr 4=104)
24
# Used if structure=urx (@attr 4=104)
(-)a/etc/zebradb/etc/words-icu.xml (+12 lines)
Line 0 Link Here
1
<icu_chain locale="">
2
  <transliterate rule="\'>\ "/>
3
  <transliterate rule="[:Number:] { '-' > '' "/>
4
  <transform rule="[:Control:] Any-Remove"/>
5
  <tokenize rule="l"/>
6
  <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
7
  <transform rule="NFD"/>
8
  <transform rule="[:Nonspacing Mark:] Remove"/>
9
  <transform rule="NFC"/>
10
  <display/>
11
  <casemap rule="l"/>
12
</icu_chain>
(-)a/rewrite-config.PL (-1 / +1 lines)
Lines 120-125 $prefix = $ENV{'INSTALL_BASE'} || "/usr"; Link Here
120
  '__ZEBRA_RUN_DIR__' => "$prefix/var/run/zebradb",
120
  '__ZEBRA_RUN_DIR__' => "$prefix/var/run/zebradb",
121
  '__ZEBRA_MARC_FORMAT__' => 'marc21',
121
  '__ZEBRA_MARC_FORMAT__' => 'marc21',
122
  '__ZEBRA_LANGUAGE__' => 'en',
122
  '__ZEBRA_LANGUAGE__' => 'en',
123
  '__ZEBRA_TOKENIZER_STMT__' => 'charmap word-phrase-utf.chr',
123
  '__ZEBRA_AUTH_CFG__' => 'zebra-authorities.cfg',
124
  '__ZEBRA_AUTH_CFG__' => 'zebra-authorities.cfg',
124
  '__AUTH_RETRIEVAL_CFG__' => 'retrieval-info-auth-grs1.xml',
125
  '__AUTH_RETRIEVAL_CFG__' => 'retrieval-info-auth-grs1.xml',
125
  "__MERGE_SERVER_HOST__" => $myhost,
126
  "__MERGE_SERVER_HOST__" => $myhost,
126
- 

Return to bug 7698