Bug 9972: Add/change some zebra indexes (MARC21)
authorMirko Tietgen <mirko@abunchofthings.net>
Tue, 2 Apr 2013 13:03:53 +0000 (15:03 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 20 Apr 2014 16:24:08 +0000 (16:24 +0000)
This patch adds :w and :p versions to the index for »Lexile number«
(it has only :n so far) and adds indexes for 653 (Index term
uncontrolled), 655 (Index term Genre/Form), 041 (language-audio) and
041 (language-subtitle). It also adds the »curriculum«-index to
Search.pm.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

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
etc/zebradb/marc_defs/marc21/biblios/record.abs

index b8cda0b..2c63f9c 100644 (file)
@@ -962,6 +962,7 @@ sub getIndexes{
                     'Corporate-name-seealso',
                     'Country-publication',
                     'ctype',
+                    'curriculum',
                     'date-entered-on-file',
                     'Date-of-acquisition',
                     'Date-of-publication',
@@ -982,6 +983,8 @@ sub getIndexes{
                     'Host-item',
                     'id-other',
                     'Illustration-code',
+                    'Index-term-genre',
+                    'Index-term-uncontrolled',
                     'ISBN',
                     'isbn',
                     'ISSN',
@@ -995,8 +998,11 @@ sub getIndexes{
                     'lc-card',
                     'LC-card-number',
                     'lcn',
+                    'lex',
                     'llength',
                     'ln',
+                    'ln-audio',
+                    'ln-subtitle',
                     'Local-classification',
                     'Local-number',
                     'Match-heading',
index 4c67071..ed8c64b 100644 (file)
@@ -356,3 +356,7 @@ att 9013    arp
 att 9520    Item
 # Curriculum
 att 9658    curriculum
+att 9653    Index-term-uncontrolled
+att 9655    Index-term-genre
+att 9906    ln-audio
+att 9907    ln-subtitle
index a46dc64..99e3498 100644 (file)
@@ -1251,3 +1251,12 @@ item Item
 
 Host-Item-Number 1=8911
 hi Host-Item-Number
+
+Index-term-uncontrolled 1=9653
+itu Index-term-uncontrolled
+
+Index-term-genre 1=9655
+itg Index-term-genre
+
+ln-audio 1=9906
+ln-subtitle 1=9907
index 5ddbb62..d3ee630 100644 (file)
   <!--record.abs line 70: melm 041$a      ln-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="041" subfields="a">
     <target_index>ln:w</target_index>
+    <target_index>ln-audio:w</target_index>
   </index_subfields>
   <!--record.abs line 71: melm 041$d      ln-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="041" subfields="d">
   <!--record.abs line 73: melm 041$j      ln-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="041" subfields="j">
     <target_index>ln:w</target_index>
+    <target_index>ln-subtitle:w</target_index>
   </index_subfields>
   <!--record.abs line 74: melm 043        Code-geographic-->
   <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="043">
   </index_data_field>
   <!--record.abs line 153: melm 521$a      lex:n-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="521" subfields="a">
+    <target_index>lex:w</target_index>
+    <target_index>lex:p</target_index>
     <target_index>lex:n</target_index>
   </index_subfields>
   <!--record.abs line 154: melm 526$c      arl,arl:n-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="652" subfields="9">
     <target_index>Koha-Auth-Number:w</target_index>
   </index_subfields>
+  <!--melm 653$a      Index-term-uncontrolled    -->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="653" subfields="a">
+    <target_index>Index-term-uncontrolled:w</target_index>
+    <target_index>Index-term-uncontrolled:p</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
   <!--record.abs line 183: melm 653$9      Koha-Auth-Number    -->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="653" subfields="9">
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
+  <!--melm 655$a      Index-term-genre    -->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="655" subfields="a">
+    <target_index>Index-term-genre:w</target_index>
+    <target_index>Index-term-genre:p</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
   <!--record.abs line 187: melm 655$9      Koha-Auth-Number    -->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="655" subfields="9">
     <target_index>Koha-Auth-Number:w</target_index>
index 2ca3dbb..a4aad7b 100644 (file)
@@ -160,7 +160,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='041']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="ln:w">
+        <z:index name="ln:w ln-audio:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -188,7 +188,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
     </xslo:for-each>
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('j', @code)">
-        <z:index name="ln:w">
+        <z:index name="ln:w ln-subtitle:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -451,7 +451,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='521']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="lex:n">
+        <z:index name="lex:w lex:p lex:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -594,6 +594,13 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
   </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='653']">
     <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Index-term-uncontrolled:w Index-term-uncontrolled:p Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w">
           <xslo:value-of select="."/>
@@ -612,6 +619,13 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
   </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='655']">
     <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Index-term-genre:w Index-term-genre:p Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w">
           <xslo:value-of select="."/>
index e867cec..dcb3cad 100644 (file)
@@ -75,11 +75,11 @@ melm 034        Map-scale
 #melm 035       Local-number,Identifier-standard
 melm 037        Identifier-standard,Stock-number
 melm 040        Code-institution,Record-source
-melm 041$a      ln
+melm 041$a      ln,ln-audio:w
 melm 041$d      ln
 melm 041$e      ln
 melm 041$h      language-original
-melm 041$j      ln
+melm 041$j      ln,ln-subtitle:w
 melm 043        Code-geographic
 #melm 046       pubdate
 melm 050$b      LC-call-number:w,LC-call-number:p,LC-call-number:s
@@ -159,7 +159,7 @@ melm 505$t      Title
 melm 505        Note:w,Note:p
 melm 510        Indexed-by
 melm 520        Abstract:w,Abstract:p
-melm 521$a      lex:n
+melm 521$a      lex:w,lex:p,lex:n
 melm 526$c      arl,arl:n
 melm 526$d      arp,arp:n
 #melm 533$d     pubdate,pubdate:s
@@ -189,10 +189,12 @@ melm 651$9      Koha-Auth-Number
 melm 651        Name-geographic,Subject,Subject:p
 melm 652$9      Koha-Auth-Number
 #melm 652       subject-heading,subject-heading:p
+melm 653$a      Index-term-uncontrolled:w,Index-term-uncontrolled:p,Subject,Subject:p
 melm 653$9      Koha-Auth-Number
 melm 653        Subject,Subject:p
 melm 654$9      Koha-Auth-Number
 melm 654        Subject,Subject:p
+melm 655$a      Index-term-genre:w,Index-term-genre:p,Subject,Subject:p
 melm 655$9      Koha-Auth-Number
 melm 655        Subject,Subject:p
 melm 656$9      Koha-Auth-Number