From 7317d41e83c039d2083e6ee7a4a9f94a4e9ce190 Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Wed, 27 Mar 2013 16:04:28 +0100 Subject: [PATCH 2] Bug 8252: Fix indexing of UNIMARC 1xx for DOM Content-Type: text/plain; charset="utf-8" This patch makes the same changes in UNIMARC DOM configuration as PATCH 1 made for GRS-1. You MUST apply the first patch with this one (this one depends on some modifications made by patch 1/2) positions of subfields are indexed that way : In biblio-koha-indexdefs.xml : tag="100" subfields="a" offset="17" length="1" In biblio-zebra-indexdefs.xsl : xslo:value-of select="substring(., 17, 1)" I had to edit biblio-zebra-indexdefs.xsl by hand, because etc/zebdradb/xml/koha-indexdefs-to-zebra.xsl does only support "subtring" in handle-one-index-control-field template. It is good for MARC21, but not for UNIMARC : in MARC21, indexing subtrings is needed for controled field (001-009, with no subfields) But in UNIMARC it is needed for subfields of 1XX fields. So if DOM indexing is working with these new files, we may need to change koha-indexdefs-to-zebra.xsl. Test plan (not possible in a sandbox) : 1) In a Koha instance using UNIMARC and DOM indexing 2) apply Patch 1 and Patch 2 (this one) 3) copy the following files from the etc/zebradb directory of your source into the etc/zebradb directory of your main Koha directory : -- etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml -- etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl -- etc/zebradb/ccl.properties -- etc/zebradb/biblios/etc/bib1.att 4) rebuild zebra with -x -b -r -v options 5) check if coded filters in advanced search are usable in OPAC and Staff interface --- .../unimarc/biblios/biblio-koha-indexdefs.xml | 134 ++++++++--- .../unimarc/biblios/biblio-zebra-indexdefs.xsl | 234 +++++++++++++++++++- 2 files changed, 321 insertions(+), 47 deletions(-) diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml index ceaba51..9ceaa8e 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml @@ -158,12 +158,14 @@ EAN:w Identifier-standard:w - + itemtype:w itemtype:p itype:w itype:p + Material-type:w + Material-type:p @@ -172,17 +174,32 @@ itype:w itype:p - - + + tpubdate:s + + ta:w + + ta:w + + ta:w + + Modified-code:n - ln:s + + char-encoding:n + + char-encoding:n + + char-encoding:n + + script-Title:n @@ -191,46 +208,93 @@ - Country-heading:w - - - - Illustration-code:w - Content-type:w - Content-type:w - Content-type:w - Content-type:w - Conference-code:w - Festschrift-indicator:w - Index-indicator:w - Literature-Code:w - Biography-Code:w - - + Country-publication:w + + + + ff8-18-21:w + + + ff8-18-21:w + + + ff8-18-21:w + + + ff8-18-21:w + + + ctype:w + + + ctype:w + + + ctype:w + + + ctype:w + + + ff8-29:w + + + ff8-30:w + + + ff8-31:w + + + lf:w + + + bio:w + + - itype:w - itype:p + ff8-23:w + ff8-23:p + + + + ff8-21:w + + + ff8-18:w - - - Type-Of-Serial:w - Frequency-code:w - Regularity-code:w - Content-type:w - Content-type:w - Conference-publication-Code:w - Title-Page-availability-Code:w - Index-availability-Code:w - Cumulative-Index-availability-Code:w + + ff8-19:w + + + ctype:w + + + ctype:w + + + ff8-29:w + + + Title-page-availability:w + + + ff8-31:w + + + Cumulative-index-availability:w - + Video-mt:w - + Graphics-type:w + + Graphics-support:w + + Graphics-support:w diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl index f1e82e3..8649a96 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl @@ -305,7 +305,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -456,8 +456,64 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -474,7 +530,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -483,8 +539,92 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -492,7 +632,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -501,8 +641,64 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -511,7 +707,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -519,8 +715,22 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - + + + + + + + + + + + + + + + + -- 1.7.9.5