From f3b5b00b8f810bdf7648ecfd01639d9e57652c24 Mon Sep 17 00:00:00 2001 From: Zeno Tajoli Date: Thu, 4 Jun 2015 17:27:10 +0200 Subject: [PATCH] [BUG 14332] Skip articles in MARC21 using indicator n.2 of field 245 Only in MARC21 is possible to use ind2 of tag 245 to skip articles. This patch is based on inserting a special template in koha-indexdefs-to-zebra.xsl With this patch you must not insert index Title:s in biblio-koha-indexdefs.xml, it is defined in koha-indexdefs-to-zebra.xsl. It is not the best setup, but I find very difficult to use biblio-koha-indexdefs.xml. To test it in a english MARC21 setup: Insert same records with titles and correct values in ind2 of 245. If you have articles not in the skiping list of sort-string-utf.chr (The|the|a|A|an|An) you can see that the sort by articles use also articles. Insert the patch Rebuilt indexes from scratch Now all articles of titles are skipped --- .../marc21/biblios/biblio-koha-indexdefs.xml | 1 - .../marc21/biblios/biblio-zebra-indexdefs.xsl | 17 ++++++++++++++++- etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl | 13 +++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) 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 8ad9db1..567a91c 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml @@ -377,7 +377,6 @@ Title-cover:s Title:w Title:p - Title:s 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 a0f68f1..760a3a0 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/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) + @@ -297,7 +299,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -2430,6 +2432,19 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + 0 + + + + + + + + + diff --git a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl index e970771..54240cf 100644 --- a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl +++ b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl @@ -39,6 +39,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + @@ -65,6 +66,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + @@ -82,6 +84,17 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + 0 + + + + + + + -- 1.7.10.4