It could be useful to index the original language of a document (i.e.
"fre" for the English translation of a French novel).
This patch renames the Bib-1 use attribute 1095 from
Code-language-original to language-original and uses it to index:
- MARC21 041$h subfield
- UNIMARC 101$c subfield
It adds "language-original" in the list of index in Search.pm.
Test plan :
A. in a MARC21 GRS1 environment
1. Copy Zebra config files (zebradb/biblios/etc/bib1.att,
zebradb/ccl.properties, marc_defs/marc21/biblios/record.abs) from
your source etc/ directory to your main koha etc/ directory
2. Reindex zebra
3. Make some searches, like "language-original:fre"
B. in a MARC21 DOM environment
4. Copy Zebra config files (zebradb/biblios/etc/bib1.att, zebradb/ccl.properties,
marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl) from your source etc/
directory to your main koha etc/ directory
5. Reindex zebra
6. Make some searches, like "language-original:fre"
C. in a UNIMARC GRS1 environment
7. Copy Zebra config files (zebradb/biblios/etc/bib1.att,
zebradb/ccl.properties, marc_defs/unimarc/biblios/record.abs) from
your source etc/ directory to your main koha etc/ directory
8. Reindex zebra
9. Make some searches, like "language-original:fre"
A. in a UNIMARC DOM environment
10. Copy Zebra config files (zebradb/biblios/etc/bib1.att,
zebradb/ccl.properties, marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl)
from your source etc/ directory to your main koha etc/ directory
11. Reindex zebra
12. Make some searches, like "language-original:fre"
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
'Koha-Auth-Number',
'l-format',
'language',
+ 'language-original',
'lc-card',
'LC-card-number',
'lcn',
att 1092 Identifier-ISMN
att 1093 Identifier-ISRN
att 1094 Identifier-DOI
-att 1095 Code-language-original
+att 1095 language-original
att 1096 Title-later
att 1185 Performer
language 1=54
ln language
+#
+#Code-language-original 1095 A code that indicates the MARC21 041$h
+# original language of the item. UNIMARC 101$c
+language-original 1=1095
+
#Code-map-scale 1024 Coded form of cartographic 034
# mathematical data, including
# scale, projection and/or
<index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="041" subfields="e">
<target_index>ln:w</target_index>
</index_subfields>
+ <!--record.abs melm 041$h language-original-->
+ <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="041" subfields="h">
+ <target_index>language-original:w</target_index>
+ </index_subfields>
<!--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>
</xslo:if>
</xslo:for-each>
<xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('h', @code)">
+ <z:index name="language-original:w">
+ <xslo:value-of select="."/>
+ </z:index>
+ </xslo:if>
+ </xslo:for-each>
+ <xslo:for-each select="marc:subfield">
<xslo:if test="contains('j', @code)">
<z:index name="ln:w">
<xslo:value-of select="."/>
melm 041$a ln
melm 041$d ln
melm 041$e ln
+melm 041$h language-original
melm 041$j ln
melm 043 Code-geographic
#melm 046 pubdate
<index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="101" subfields="a">
<target_index>ln:w</target_index>
</index_subfields>
+ <!--record.abs line 49: melm 101$h language-original-->
+ <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="101" subfields="c">
+ <target_index>language-original:w</target_index>
+ </index_subfields>
<!--record.abs line 50: melm 102$a Country-heading-->
<index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="102" subfields="a">
<target_index>Country-publication:w</target_index>
</xslo:if>
</xslo:for-each>
</xslo:template>
+ <xslo:template mode="index_subfields" match="marc:datafield[@tag='101']">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('c', @code)">
+ <z:index name="language-original:w">
+ <xslo:value-of select="."/>
+ </z:index>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:template>
<xslo:template mode="index_subfields" match="marc:datafield[@tag='102']">
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('a', @code)">
# Script of title 2 34-35
melm 100$a tpubdate:s:range(data,8,1),ta:w:range(data,17,1),ta:w:range(data,18,1),ta:w:range(data,19,1),Modified-code:n:range(data,21,1),char-encoding:n:range(data,26,2),char-encoding:n:range(data,28,2),char-encoding:n:range(data,30,2),script-Title:n:range(data,34,2)
melm 101$a ln
+melm 101$c language-original
melm 102$a Country-publication
# Field 105 Description