KOHA
Zebra indexing: Revision 29
Zebra start i stopmglavica@koha-upgrade:~$ sudo /usr/share/koha/bin/koha-zebra-ctl.sh start Starting Zebra Server mglavica@koha-upgrade:~$ sudo /usr/share/koha/bin/koha-zebra-ctl.sh stop Stopping Zebra Server Obnavljanje zapisa u indexuZa to bi trebao služiti Zebraqueue Daemon, ali ne radi kako treba (koha-zebraqueue-ctl.sh). Umjesto toga index se rebuilda svako malo uz pomoć crona Pokrenuti kao user koha. KOHA_CONF=/etc/koha/koha-conf.xml PERL5LIB=/usr/share/koha/lib # m h dom mon dow command */4 * * * * ps ax | grep -v grep | grep rebuild_zebra.pl || /srv/koha/misc/migration_tools/rebuild_zebra.pl -b -z >/dev/null Dodavanje polja u pretraživanje
etc/zebradb/marc_defs/marc21/biblios/record.abs
etc/zebradb/biblios/etc/bib1.att
etc/zebradb/ccl.properties UTF-8 to ASCII mappingshttp://lists.indexdata.dk/pipermail/zebralist/2007-August/001707.html Dijakritički znakoviSituacija: u bazu su povučeni zapisi iz NSK (Voyager) u kojima su naša slova s dijaktiticima zabilježena kao dva znaka (slovo bez dijakritika + dijaktitik).
Nije lijepo da takvi znakovi završe u Koha bazi, ali kad su već unutra, treba ih nekako učiniti pretraživima. # Characters to be considered equivalent for searching purposes equivalent č(cˇ) equivalent Č(Cˇ) equivalent ć(c´) equivalent Ć(C´) equivalent š(sˇ) equivalent Š(Sˇ) equivalent ž(zˇ) equivalent Ž(Zˇ) Sad to dobro radi kad se pretražuje s "normalnim" znakovima. Ostaje problem kod browsanja preko liknova - strgani zapisi nađu samo strgane (pr. http://10.60.0.253/cgi-bin/koha/opac-detail.pl?biblionumber=241488, Pavao Pavličić). Zebra register i shadowVeličinu zebra register i shadow treba podesiti sukladno veličini baze. Za oko 120.000 zapisa, dovoljno je 4G. Za FF je sada podešeno 16GB. Z39.50 serverDokumentacija
Ali sve je uzalud jer je pravi odgovor na http://www.indexdata.com/zebra/doc/zebrasrv.html The first two servers, "server1" and "server2", can be reached by both listener addresses - since no listenref attribute is specified. Pravo rješenje
test-yaz-zebra.sh Serversluži za razmjenu zapisa KonfiguracijaDodati novi public server prema uputama na http://wiki.koha-community.org/wiki/Troubleshooting_Koha_as_a_Z39.50_server DokumentacijaNajkorisnije:
Ostalo:
FFZGyaz-clientdpavlin@koha-dev:~$ yaz-client Z> open localhost:9999/biblios Connecting...OK. Sent initrequest. Connection accepted by v3 target. ID : 81 Name : Zebra Information Server/GFS/YAZ Version: 3.0.52 e687cb7eb87c841f0d1a374174d51d30371f2d97 Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets Elapsed: 1.605266 Z> find human Z> show 1 Z> quit See you later, alligator. Use Koha's CCL queries: dpavlin@koha-dev:~$ yaz-client -c /etc/koha/zebradb/ccl.properties localhost:9999/biblios Connecting...OK. Sent initrequest. Connection accepted by v3 target. ID : 81 Name : Zebra Information Server/GFS/YAZ Version: 4.1.7 c43e561fdfe12989a6040163dae0e28ba0a02453 Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets Elapsed: 0.001445 Z> querytype ccl2rpn Z> find (kw,wrdl,rtrn=human ) not Suppress=1 Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 1935, setno 1 SearchResult-1: term= human cnt=1935, term= 1 cnt=21 records returned: 0 Elapsed: 0.025643 Z> Debug Zebra problemsenable all logging# add all to http://www.loc.gov/z3950/agency/defns/bib1diag.html ZEBRAOPTIONS="-v none,fatal,warn,all" dpavlin@koha-dev:~$ sudo /etc/init.d/koha-zebra-ctl.sh restart Restarting the Zebra Server dpavlin@koha-dev:~$ sudo tail -f /var/log/koha/koha-zebradaemon-output.log | grep ERROR 18:45:58-29/03 zebrasrv(1) 605aecf5 [request] Init ERROR 1011 ID:81 Name:ZOOM-C/YAZ Version:4.1.7 c43e561fdfe12989a6040163dae0e28ba0a02453 Lookup error codes at http://www.loc.gov/z3950/agency/defns/bib1diag.html ProblemiNeki zapisi nestaju u katalogu Nepoznat obrazac u zapisima koji fale. Nagađanje 1:
da li su problematični oni zapisi koji imaju različit biblionumber i biblioitemnumber? mysql> create temporary table foo as select max(id) as id from zebraqueue join biblioitems on biblioitems.biblionumber=zebraqueue.biblio_auth_number and biblionumber <> biblioitemnumber group by biblio_auth_number ; mysql> update zebraqueue set done = 0 where id in (select id from foo) ; Nakon toga pokrenuti rebuild_zebra.pl. I dalje postoje zapisi koji se ne vide u katalogu. Isprobano je ponovno indeksiranje zapisa i na jednom setu, ne znam kojem :(, zebra je javila ovo: 03:44:43-29/01 zebraidx(11983) [log] MARC: Bad directory 03:44:43-29/01 zebraidx(11983) [warn] MARC: Base address does not follow directory 03:44:43-29/01 zebraidx(11983) [warn] MARC: Bad offsets in data. Skipping rest 03:44:43-29/01 zebraidx(11983) [warn] Record didn't contain match fields in (bib1,Local-number) 03:44:43-29/01 zebraidx(11983) [log] error grs.marcxml.record /tmp/7EOcJqT94o/upd_biblio/exported_records 1580603 Nagađanje 2: Potrgan MARC
Out of memory |