ICU chains configuration

From Koha Wiki

Jump to: navigation, search
I18n
Home > Documentation
Home > Documentation > Installation
Home > Documentation > Search Engine > Zebra
Koha > Technical > Administration
Translation

First, Install yaz-icu package:

sudo apt-get install yaz-icu

Go to more> Administration > Global system preferences > Searching.

Change UseICU to use (if the syspref exists).

Change QueryFuzzy to don't try.

Change QueryStemming to don't try.

edit /etc/koha/zebradb/etc/default.idx

Change the bolded lines:

 # Traditional word index
 # Used if completenss is 'incomplete field' (@attr 6=1) and
 # structure is word/phrase/word-list/free-form-text/document-text
 index w
 completeness 0
 position 1
 alwaysmatches 1
 firstinfield 1
 icuchain words-icu.xml
 
 
 # Phrase index
 # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
 # and structure is word/phrase/word-list/free-form-text/document-text
 index p
 completeness 1
 firstinfield 1
 icuchain phrases-icu.xml 

Depending on the language being searched, you may need to modify words-icu.xml or phrases-icu.xml in the same directory as /etc/koha/zebradb/etc/default.idx. The ICU_Chains_Library contains the modifications for several languages; you are encouraged to add more.

If you are using packages, run:

 sudo koha-restart-zebra {yourinstance}
 sudo koha-rebuild-zebra -f {yourinstance}

(replacing {yourinstance} with the name of your instance)

If you are using a tarball installation or git installation (in which case you will need to change all the paths) execute now these two lines:

 /etc/init.d/koha-zebra-daemon restart
 /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v -w 

you may have to execute something this first:

 sudo bash
 export PERL5LIB=/usr/share/koha/lib
 export KOHA_CONF=/etc/koha/sites/iesh/koha-conf.xml
Personal tools