Bug 15187: Index 880 in Zebra the same as Elasticsearch
authorDavid Cook <dcook@prosentient.com.au>
Mon, 2 May 2022 07:34:34 +0000 (07:34 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 22 Jul 2022 18:09:46 +0000 (15:09 -0300)
commit85690a14f8685a2eb6cb88316bb4a3145c024cc2
treeb7defc359de4089c76d489eefa9e0044c92b8cef
parent87aa05f9deb7fa09f059d53b422b89c8411e0c84
Bug 15187: Index 880 in Zebra the same as Elasticsearch

This patch modifies the MARC21 export to Zebra, so that 880 fields
are rewritten as their linked fields, in the same way that we
already do with Elasticsearch, so that the alternate graphic
representation of fields are indexed accordingly. (ie 880 $6245-01
Chinese titles will be indexed into the title index using the 245 rules)

Test plan:
0. Apply patch
1. Turn on ICU indexing
1b. vi /etc/koha/zebradb/etc/default.idx
1c. Replace charmap word-phrase-utf.chr with icuchain words-icu.xml
1d. Replace charmap word-phrase-utf.chr with icuchain phrases-icu.xml
1e. Restart Zebra server
1f. Re-index Zebra
2. Add record with a 880 $6 245-01 $a 教牧書信 field.
3. Search for this record using a title index with the Chinese title
4. Note that the record is correctly retrieved

(Note: This test probably works better using author or series as they
 present as links on the detail page which makes the fix more obviously
 useful.)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Filter/MARC/Index880InZebra.pm [new file with mode: 0644]
misc/migration_tools/rebuild_zebra.pl