https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43498
--- Comment #3 from Frédéric Demians <[email protected]> --- Created attachment 207943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207943&action=edit Bug 43498: Add a phrase Zebra index for 'authtype' in UNIMARC 942$a Bug 41795 added the completeness attribute (@attr 6=3) to the authtype clause of authority searches. As per https://software.indexdata.com/zebra/doc/querymodel-rpn.html#querymodel-bib1-completeness: "[...] Complete field (3) triggers search and scan in index type="p"." The UNIMARC Zebra authority index definitions include a 'p' (phrase) type index for authtype built from 152$b, but the 942$a block only indexes 'authtype:w'. As a result, on UNIMARC instances whose authority records carry the authority type in 942$a only (with no 152$b), every type-filtered authority search returns zero results -- including the authority finder launched from the bibliographic editor (e.g. on field 600), which always passes an authtypecode. The MARC21 index definitions received the equivalent fix in the Bug 41795 follow-up ("add a phrase Zebra index for 'authtype'"); this patch applies the same one-line change to the UNIMARC definitions. NOTE: Elasticsearch is not affected. Existing installations must do a full authorities reindex for this change to take effect. Test plan (tailored for KTD): 0) Launch a UNIMARC Koha instance using Zebra: ktd --marcflavour unimarc up 1) Create an authority record whose type is stored in 942$a only, i.e. with no 152$b field (this mirrors real-world UNIMARC sites that do not use the 152 coded data field), then do a full authorities reindex: k$ koha-rebuild-zebra -a -f -v kohadev 2) In the Staff interface, edit a bibliographic record, and on a field linked to that authority type (e.g. 600) launch the authority finder and search for the record from Step 1. => The search returns no results. The same search without a type filter (Authority search with 'Default') finds it. 3) Apply this patch, then deploy the updated definitions and reindex: k$ sudo cp etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml /etc/koha/zebradb/marc_defs/unimarc/authorities/ k$ sudo cp etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/unimarc/authorities/ k$ koha-rebuild-zebra -a -f -v kohadev 4) Repeat the search from Step 2. => The authority record is now found. Sponsored-by: Altsol Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CNyQfnYVu99DxGfr5hhG3b Signed-off-by: Frédéric Demians <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
