Bug 10729: Add phrases configuration for ICU

Add a separate phrases-icu.xml for phrase indexes
The file is based on that distributed with zebra
with a couple of additions to reflect Koha usage

This patch adds a separate tokenizer variable
for phrase indexes so that default.idx is
correctly rewritten for sites using icu
indexing

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Applied patch
- perl Makefile.PL --prev-install-log ../koha-dev/misc/koha-install-log
- make upgrade
- Restarted Zebra server
- Did a full reindex of bibliographic and authorities
- Checked various searches
- Links records to authorities
- Checked created links work correctly

I couldn't find a regression with this patch.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 735381b371)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c0adc32d23)
This commit is contained in:
Colin Campbell 2013-08-14 16:21:26 +01:00 committed by Kyle M Hall
parent 3d1598e2ec
commit e867f2c3dc
4 changed files with 16 additions and 1 deletions

View File

@ -555,6 +555,10 @@ $config{ZEBRA_TOKENIZER_STMT} = $config{ZEBRA_TOKENIZER} eq 'icu'
? 'icuchain words-icu.xml'
: 'charmap word-phrase-utf.chr';
$config{ZEBRA_PTOKENIZER_STMT} = $config{ZEBRA_TOKENIZER} eq 'icu'
? 'icuchain phrases-icu.xml'
: 'charmap word-phrase-utf.chr';
my %test_suite_override_dirs = (
KOHA_CONF_DIR => ['etc'],
ZEBRA_CONF_DIR => ['etc', 'zebradb'],

View File

@ -18,7 +18,7 @@ __ZEBRA_TOKENIZER_STMT__
index p
completeness 1
firstinfield 1
__ZEBRA_TOKENIZER_STMT__
__ZEBRA_PTOKENIZER_STMT__
# URX (URL) index
# Used if structure=urx (@attr 4=104)

View File

@ -0,0 +1,10 @@
<icu_chain locale="">
<transform rule="[:Control:] Any-Remove"/>
<tokenize rule="l"/>
<transform rule="[:Punctuation:] Remove"/>
<transform rule="NFD"/>
<transform rule="[:Nonspacing Mark:] Remove"/>
<transform rule="NFC"/>
<display/>
<casemap rule="l"/>
</icu_chain>

View File

@ -124,6 +124,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr";
'__ZEBRA_LANGUAGE__' => 'en',
'__ZEBRA_TOKENIZER__' => 'chr',
'__ZEBRA_TOKENIZER_STMT__' => 'charmap word-phrase-utf.chr',
'__ZEBRA_PTOKENIZER_STMT__' => 'charmap word-phrase-utf.chr',
'__ZEBRA_AUTH_CFG__' => 'zebra-authorities.cfg',
'__ZEBRA_BIB_CFG__' => 'zebra-biblios.cfg',
'__AUTH_RETRIEVAL_CFG__' => 'retrieval-info-auth-grs1.xml',