Bug 14198: RDA: Indexing 264 field (Zebra)
authorHector Eduardo Castro Avalos <hector.hecaxmmx@gmail.com>
Mon, 1 Jun 2015 02:54:58 +0000 (20:54 -0600)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 2 Nov 2015 14:41:36 +0000 (11:41 -0300)
This patch add zebra indexes to RDA 264 field.
The new Provider index is added too.
QA comments corrected.

To test:
1) Download RDA records with 264 fields from this attachment <http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36825>. Import the file and re-index/rebuild zebra. These records contain 260 and 264 fields per record.
2) Do a search with pb:Bethany two records will appear with title The guardian. Search with pl:Minneapolis too, the two records will appear.
3) Select one record of both records and delete the 260 field keeping the 264 field and save, rebuild your zebra.
4) Search again with pb:Bethany and just one record will appear. Thats mean 264 is not indexed.
5) Apply patches.
6) Rebuild your zebra but this time all biblio records.
7) Search again with pv:Bethany or Provider:Bethany, this time will appear the two records, 264 is indexed. Note that if you search again with pb only one record appear. This is because the suggestion of LOC.
10) Search with copydate:2013 only launch records with 260 fields and pv:2013 show both fields, i.e., 260 and 264.
11) Apply QA Test Tools

Sponsored-by: Universidad de El Salvador
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

C4/Search.pm
etc/zebradb/biblios/etc/bib1.att
etc/zebradb/ccl.properties
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl

index a871586..11b4909 100644 (file)
@@ -1198,6 +1198,8 @@ sub getIndexes{
                     'popularity',
                     'pubdate',
                     'Publisher',
+                    'Provider',
+                    'pv',
                     'Record-control-number',
                     'rcn',
                     'Record-type',
index de04e2d..d34325a 100644 (file)
@@ -205,6 +205,7 @@ att 1221    Subject-occupation
 att 1222    Subject-function
 att 1223    Edition
 att 1224    GPO-Item-Number
+att 1225    Provider
 
 # Koha Local-Use Biblio Indexes
 att 9001    Control-number
index 51236ac..58df11c 100644 (file)
@@ -579,6 +579,14 @@ Personal-name-seealso 1=Personal-name-seealso
 Publisher 1=1018
 pb Publisher
 
+#Provider             1225  A generic, single index         257$a2
+#                           combining place, publisher,     260$abcdefg3
+#                           and date. To avoid searching    264$abc3
+#                           multiple indexes for            270$abcd
+#                           publication/production info.
+Provider 1=1225
+pv Provider
+
 #Note                   63  A concise statement in which    5XX
 #                           such information as extended
 #                           physical description,
index 1c1abe6..6b1fb87 100644 (file)
   <!--record.abs line 122: melm 260        pl-->
   <index_data_field tag="260">
     <target_index>pl:w</target_index>
+    <target_index>Provider:w</target_index>
+  </index_data_field>
+  <!--Index for RDA 264 field-->
+  <index_data_field tag="264">
+    <target_index>Provider:w</target_index>
   </index_data_field>
   <!--record.abs line 123: melm 300        Extent:w,Extent:p-->
   <index_data_field tag="300">
index 1f09b25..604c76a 100644 (file)
@@ -1861,7 +1861,20 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
     </z:index>
   </xslo:template>
   <xslo:template mode="index_data_field" match="marc:datafield[@tag='260']">
-    <z:index name="pl:w">
+    <z:index name="pl:w Provider:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='264']">
+    <z:index name="Provider:w">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
           <xslo:if test="position() &gt; 1">