Bugzilla – Attachment 126025 Details for
Bug 28337
Add System-control-number index for authorities to MARC21 indexes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28337: Add System-control-number index to Zebra MARC21 files
Bug-28337-Add-System-control-number-index-to-Zebra.patch (text/plain), 4.83 KB, created by
Katrin Fischer
on 2021-10-10 16:00:28 UTC
(
hide
)
Description:
Bug 28337: Add System-control-number index to Zebra MARC21 files
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-10-10 16:00:28 UTC
Size:
4.83 KB
patch
obsolete
>From 2c2f7afb1b6f11f8b644c57e25013d16ec98cfac Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 12 May 2021 17:49:36 +0000 >Subject: [PATCH] Bug 28337: Add System-control-number index to Zebra MARC21 > files > >To test: >1 - Apply patch >2 - Copy zebra files to destination: > cp /kohadevbox/koha/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml /etc/koha/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > cp /kohadevbox/koha/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >3 - Reindex authorities >4 - Edit an authority and add 035$aExpialodocious >5 - Export the authority >6 - Create a new record matchign rule: > Matching rule code: OCN > Description: Other control number > Match threshhold: 1000 > Record type: Authority record > Search-index: Other-control-number > Score: 1000 > Tag: 035 > Subfields: a >7 - Stage the record and use the new matchign rule >8 - Match found! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > etc/zebradb/authorities/etc/bib1.att | 1 + > etc/zebradb/ccl.properties | 1 + > .../marc_defs/marc21/authorities/authority-koha-indexdefs.xml | 6 ++++++ > .../marc21/authorities/authority-zebra-indexdefs.xsl | 11 ++++++++++- > 4 files changed, 18 insertions(+), 1 deletion(-) > >diff --git a/etc/zebradb/authorities/etc/bib1.att b/etc/zebradb/authorities/etc/bib1.att >index 3e0f5fb5f0..e5ddd9627c 100644 >--- a/etc/zebradb/authorities/etc/bib1.att >+++ b/etc/zebradb/authorities/etc/bib1.att >@@ -14,6 +14,7 @@ att 9043 Kind-of-record > att 9046 Record-status > att 9050 Subject-heading-thesaurus > att 9051 Previous-heading-see-from >+att 9052 Other-control-number > > # Personal Name > att 1 Personal-name >diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties >index 53f042c184..842e1abae0 100644 >--- a/etc/zebradb/ccl.properties >+++ b/etc/zebradb/ccl.properties >@@ -888,6 +888,7 @@ Heading-use-main-or-added-entry 1=Heading-use-main-or-added-entry > Heading-use-series-added-entry 1=Heading-use-series-added-entry > Heading-use-subject-added-entry 1=Heading-use-subject-added-entry > Subject-heading-thesaurus 1=Subject-heading-thesaurus >+Other-control-number 1=Other-control-number > > ################################################### > ### 2. BIB1 RELATION ATTRIBUTES >diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml >index 39b46025f7..49f1c9f6f2 100644 >--- a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml >@@ -55,6 +55,12 @@ authority-zebra-indexdefs.xsl` > <kohaidx:target_index>LC-card-number:p</kohaidx:target_index> > </kohaidx:index_subfields> > >+ <!-- 035 Other control number --> >+ <kohaidx:index_subfields tag="035" subfields="az"> >+ <kohaidx:target_index>Other-control-number:w</kohaidx:target_index> >+ <kohaidx:target_index>Other-control-number:p</kohaidx:target_index> >+ </kohaidx:index_subfields> >+ > <!-- 040 cataloging agencies --> > <kohaidx:index_subfields tag="040" subfields="acd"> > <kohaidx:target_index>Record-source:w</kohaidx:target_index> >diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >index a6e472c8f8..0723caf2b4 100644 >--- a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >@@ -53,7 +53,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </z:index> > </xslo:template> > <xslo:template match="marc:controlfield[@tag='001']"> >- <z:index name="Local-Number:w Local-Number:n Local-Number:s Local-Number:p"> >+ <z:index name="Local-Number:w Local-Number:p Local-Number:n Local-Number:s"> > <xslo:value-of select="."/> > </z:index> > </xslo:template> >@@ -83,6 +83,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > </xslo:template> >+ <xslo:template mode="index_subfields" match="marc:datafield[@tag='035']"> >+ <xslo:for-each select="marc:subfield"> >+ <xslo:if test="contains('az', @code)"> >+ <z:index name="Other-control-number:w Other-control-number:p"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:if> >+ </xslo:for-each> >+ </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='040']"> > <xslo:for-each select="marc:subfield"> > <xslo:if test="contains('acd', @code)"> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28337
:
120894
|
120946
|
123184
|
124240
|
126024
| 126025 |
126026