[Koha-patches] [PATCH] Bug 16986: Added 035 $a tag to search index as OCLC-Number
Srdjan
srdjan at catalyst.net.nz
Wed Jul 27 05:20:30 CEST 2016
---
C4/Search.pm | 2 ++
etc/searchengine/queryparser.yaml | 9 +++++++++
etc/zebradb/ccl.properties | 5 +++++
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml | 5 +++++
etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl | 9 +++++++++
etc/zebradb/marc_defs/marc21/biblios/record.abs | 2 +-
6 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index 36c4cfa..84f70c4 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1179,6 +1179,8 @@ sub getIndexes{
'notes',
'ns',
'nt',
+ 'oclc',
+ 'OCLC-Number',
'pb',
'Personal-name',
'Personal-name-heading',
diff --git a/etc/searchengine/queryparser.yaml b/etc/searchengine/queryparser.yaml
index d9f637b..da7a6d6 100644
--- a/etc/searchengine/queryparser.yaml
+++ b/etc/searchengine/queryparser.yaml
@@ -923,6 +923,15 @@ field_mappings:
aliases:
- notforloan
label: Notforloan
+ oclc:
+ bib1_mapping:
+ biblioserver:
+ 1: 1211
+ enabled: 1
+ index: oclc
+ aliases:
+ - oclc
+ label: OCLC-Number
onloan:
bib1_mapping:
biblioserver:
diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties
index 873c749..90dd51f 100644
--- a/etc/zebradb/ccl.properties
+++ b/etc/zebradb/ccl.properties
@@ -581,6 +581,11 @@ Personal-name-seealso 1=Personal-name-seealso
Publisher 1=1018
pb Publisher
+#OCLC-Number 1211 A sequential accession number 035$a
+# assigned by OCLC
+OCLC-Number 1=1211
+oclc OCLC-Number
+
#Provider 1225 A generic, single index 257$a2
# combining place, publisher, 260$abcdefg3
# and date. To avoid searching 264$abc3
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 35b1c71..cbd95c4 100644
--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
@@ -180,6 +180,11 @@
<index_data_field tag="034">
<target_index>Map-scale:w</target_index>
</index_data_field>
+ <!--record.abs line 75: melm 035$a OCLC-Number:w,Identifier-standard:w-->
+ <index_subfields tag="035" subfields="a">
+ <target_index>OCLC-Number:w</target_index>
+ <target_index>Identifier-standard:w</target_index>
+ </index_subfields>
<!--record.abs line 68: melm 037 Identifier-standard,Stock-number-->
<index_data_field tag="037">
<target_index>Identifier-standard:w</target_index>
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 16b339e..16ae588 100644
--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
@@ -191,6 +191,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
</xslo:for-each>
</xslo:if>
</xslo:template>
+ <xslo:template mode="index_subfields" match="marc:datafield[@tag='035']">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)">
+ <z:index name="OCLC-Number:w Identifier-standard:w">
+ <xslo:value-of select="."/>
+ </z:index>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:template>
<xslo:template mode="index_subfields" match="marc:datafield[@tag='041']">
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('a', @code)">
diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs
index efdcf80..4a25094 100644
--- a/etc/zebradb/marc_defs/marc21/biblios/record.abs
+++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs
@@ -72,7 +72,7 @@ melm 028 Identifier-publisher-for-music,Identifier-standard
melm 030 CODEN,Identifier-standard
#melm 033 Date
melm 034 Map-scale
-#melm 035 Local-number,Identifier-standard
+melm 035$a OCLC-Number,Identifier-standard
melm 037 Identifier-standard,Stock-number
melm 040 Code-institution,Record-source
melm 041$a ln,ln-audio:w
--
2.7.4
More information about the Koha-patches
mailing list