From 1afa9003bf08491a429255eeb638ced5d6980a10 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 2 Dec 2016 17:16:10 -0300 Subject: [PATCH] Bug 17547: (MARC21|NORMARC) have Chronological term field $9 indexed This patch makes Zebra index the 648$9 link for chronological terms on bibliographic records. This way an authority search on chronological terms will show the right number in 'Used in X records' message. To test: - Have a record with a 648 field, linked to an authority record (i.e. with an authid on 648$9). - Search for the record, notice it is indexed. - Perform an authority search for the chronological term => FAIL: the term is linked to our record, but koha shows '0' count. - Apply the patch - Run: $ cd kohaclone $ xsltproc etc/zebra/xsl/koha-indexdefs-to-zebra.xsl \ etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml \ > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl $ git diff => SUCCESS: Notice the shipped etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl is up-to-date - Run: $ sudo cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl $ sudo koha-restart-zebra kohadev $ sudo koha-rebuild-zebra -f -b -v kohadev - Search for the record, notice it is indexed. - Perform an authority search for the chronological term => SUCCESS: the term is linked to our record, usage count is 1 - Sign off :-D I assume NORMARC is similar on this regard. Feel free to fail it if the NORMARC part of the patch is wrong. Sponsored-by: Universidad Nacional de Cordoba --- .../marc21/biblios/biblio-koha-indexdefs.xml | 3 +++ .../marc21/biblios/biblio-zebra-indexdefs.xsl | 9 ++++++++ .../normarc/biblios/biblio-koha-indexdefs.xml | 3 +++ .../normarc/biblios/biblio-zebra-indexdefs.xsl | 24 ++++++++++++++++++++++ 4 files changed, 39 insertions(+) diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml index 38f91a2..49f774a 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml @@ -709,6 +709,9 @@ Subject:w Subject:p + + Koha-Auth-Number:w + Koha-Auth-Number:w diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl index dd2a760..5feab04 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl @@ -628,6 +628,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + + + + + diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml index 0918f2a..dff2d75 100644 --- a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml @@ -477,6 +477,9 @@ Subject:w Subject:p + + Koha-Auth-Number:w + Koha-Auth-Number:w diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl index 1eeca69..301f9a7 100644 --- a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl @@ -17,6 +17,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + @@ -42,6 +43,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + @@ -409,6 +411,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + + + + + @@ -1855,6 +1866,19 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + 0 + + + + + + + + + -- 2.7.4