From b35ae5a9e9042fc1a4dc7329e2a34c64b61f6e4f 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 Signed-off-by: Hugo Agud Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit cb3f899826966b5da1242292091aa71ab4831618) Signed-off-by: Katrin Fischer (cherry picked from commit 80955d365af98627110783bc16b12964d117273d) Signed-off-by: Julian Maurice --- .../marc21/biblios/biblio-koha-indexdefs.xml | 3 +++ .../marc21/biblios/biblio-zebra-indexdefs.xsl | 9 +++++++ .../normarc/biblios/biblio-koha-indexdefs.xml | 3 +++ .../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 38f91a2103..49f774aa88 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 dd2a7602e3..5feab047fb 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 0918f2a8a0..dff2d7514e 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 1eeca69697..301f9a76dc 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.39.5