Zebra Search and Multilingual Problem in koha

can apply patches http://git.biblibre.com/cgi-bin/gitweb.cgi?p=koha;a=commitdiff_plain;h=b4068c1da33de36019bf4192150b6234bb8c7dbf;hp=a739ed37ef5e289cf6ac9815acd9fc6ede052bfc
OR do the following

#sudo apt-get install libicu-dev libicu38 yaz-icu

Copy following files from /usr/share/idzebra-2.0/tab/
to /etc/koha/zebradb/etc/

Copy /etc/koha/zebradb/etc/words-icu.xml to /etc/koha/zebradb/etc/icu.xml

Edit /etc/koha/zebradb/etc/icu.xml change to

Save and change ownership of all copied files to koha:koha

#sudo chown -R koha:koha /etc/koha/zebradb/etc

Edit /etc/koha/zebradb/zebra-biblios.cfg
add line
index: icu.idx

Restart zebra server and queue daemons
#sudo /etc/init.d/koha-zebra-daemon restart
#sudo /etc/init.d/koha-zebraqueue-daemon restart

Rebuild zebra index
#sudo KOHA_CONF=/etc/koha/koha-conf.xml PERL5LIB=/usr/share/koha/lib /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v

Using yaz-client to verify zebra is working
z>auth kohauser zebrastripes
z>open unix:/var/run/koha/zebradb/bibliosocket
z>base biblios

Adjusting Koha System Preferences to correctly search our multilingual data
In Koha staff client
Home → Administration → System Preferences → Searching
Turn off QueryFuzzy ( maybe and QueryWeightFields)

If you have problem after doing above then try:
Zebra configuration
Open a terminal and login as root
sudo ln -s /usr/share/koha/bin/koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon
sudo update-rc.d koha-zebra-daemon defaults
sudo ln -s /usr/share/koha/bin/koha-zebraqueue-ctl.sh /etc/init.d/koha-zebraqueue-daemon
sudo update-rc.d koha-zebraqueue-daemon defaults

Edit the following files,

sudo gedit /usr/share/koha/bin/koha-zebra-ctl.sh
sudo gedit /usr/share/koha/bin/koha-zebraqueue-ctl.sh

Change USER and GROUP to root. Result is,

Set following folders ownership to Koha user

sudo chmod -R 777 /var/lock/koha
sudo chown -R koha:koha /var/lock/koha
sudo chmod -R 777 /var/lib/koha/
sudo chown -R koha:koha /var/lib/koha 
sudo chmod -R 777 /etc/koha/zebradb/etc
sudo chown -R koha:koha /etc/koha/zebradb/etc
sudo chmod -R 777 /usr/share/koha
sudo chown -R koha:koha /usr/share/koha
sudo chmod -R 777 /var/run/koha/zebradb
sudo chown -R koha:koha /var/run/koha/zebradb
Cronjob Settings
sudo su
cd /usr/share/koha/bin/cronjobs
crontab -u root crontab.example
crontab -u username crontab.example  [Username denotes name of your home user]
crontab -e

Change the locations in following lines ,


#Some additional variables

Save the file by pressing ctrl+o buttons
Press enter
Quit the editor by pressing ctrl+X buttons

Starting Zebra Server

Open a terminal and type following commands,

sudo su
cd /usr/share/koha/bin
sh koha-zebra-ctl.sh start
sh koha-zebraqueue-ctl.sh start

Rebuilding Zebra Index

sudo su
export PERL5LIB=/usr/share/koha/lib
cd /usr/share/koha/bin/migration_tools

Quick Indexing
 ./rebuild_zebra.pl -b -w  (or)
./rebuild_zebra.pl -b -w -r

Rebuilding Index
./rebuild_zebra.pl -v -b -a -r

(‘./rebuild_zebra.pl -a -b -r -v’)

This can happen when a marc record is too large. Never fear there is a
very very easy solution.

Run 2 commands

./rebuild_zebra.pl -b -x
./rebuild_zebra.pl -a


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s