[Koha-patches] [PATCH 1/2] [Bug #5165] New zebraqueue

Frederic Demians frederic at tamil.fr
Tue Aug 24 22:36:55 CEST 2010


I have also such a tool to replace rebuild_zebra.pl which allow to index 
edited biblio records at a faster speed than once per minute.

It's here: http://git.tamil.fr/?p=tkoha

There is a script to index queued records or a whole DB: 
/bin/koha-index. You have those possibilities for example:

  koha-index --verbose
  koha-index --from biblio --select queue
  koha-index --from authority --select all
  koha-index --koha_conf /etc/koha/mylib.xml --select queue \\
             --directory /tmp/koha-index-mylib

There is a daemon script which inspect zebraqueue: 
/bin/koha-index-daemon. It uses POE module. It doesn't use C4::Context, 
the connexion with Koha DB being managed directly by a new Koha.pm module.

This script read a YAML configuration file in order to know what to 
index, and
at which periodicity. Without parameter, this script read this file:

  /etc/koha-index-daemon.conf

Some info on daemon activity are logged in syslog.

YAML conf file looks like that:

---
library1:
   name: My First Library
   conf_file: /home/tamil/library1/etc/koha-conf.xml
   directory: /var/tmp/koha-indexer-library1
   timeout: 10
library2:
   name: My Second Library
   conf_file: /home/tamil/library2/etc/koha-conf.xml
   directory: /var/tmp/koha-indexer-library2
   timeout: 20


All the indexing logic used by those scripts is centralized in a Koha 
Indexer module. You can take a look at it in /lib/Koha/Indexer.pm. 
Contrary to rebuild_zebra.pl, there is no biblio record sanitizing at all.

Those scripts use Moose object system. So it's not integrable in Koha 
3.2. Maybe 3.4...


--
Frédéric


More information about the Koha-patches mailing list