From 451f67c05593461d2756a161032c39113d282c25 Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Sun, 28 Apr 2013 14:44:21 +0200 Subject: [PATCH] Bug 9940: Add a new index for the original language of a document 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 Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- C4/Search.pm | 1 + etc/zebradb/biblios/etc/bib1.att | 2 +- etc/zebradb/ccl.properties | 5 +++++ .../marc_defs/marc21/biblios/biblio-koha-indexdefs.xml | 4 ++++ .../marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl | 7 +++++++ etc/zebradb/marc_defs/marc21/biblios/record.abs | 1 + .../marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml | 4 ++++ .../marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl | 9 +++++++++ etc/zebradb/marc_defs/unimarc/biblios/record.abs | 1 + 9 files changed, 33 insertions(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 8903ca70fb..18a0f5f232 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -987,6 +987,7 @@ sub getIndexes{ 'Koha-Auth-Number', 'l-format', 'language', + 'language-original', 'lc-card', 'LC-card-number', 'lcn', diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index 91aa69653d..4c67071e0a 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -162,7 +162,7 @@ att 1091 Identifier-ISRC 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 diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 14aa7b21e7..3a1c578c59 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -254,6 +254,11 @@ Code-institution 1=56 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 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 731b8ada8a..ab00448a23 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml @@ -186,6 +186,10 @@ ln:w + + + language-original:w + ln:w 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 f8564ed6c7..2cd71952cb 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl @@ -179,6 +179,13 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + + + diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs index e17adb059e..b4a79f8b35 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -78,6 +78,7 @@ melm 040 Code-institution,Record-source 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 diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml index 3d926a3b9d..d04d9d8fa5 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml @@ -206,6 +206,10 @@ ln:w + + + language-original:w + Country-publication:w diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl index de3f06f390..eecdad78d3 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl @@ -542,6 +542,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + + + + + diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index aa0f74dcff..c4ce0257ee 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -104,6 +104,7 @@ melm 995$r itemtype:w,itemtype:p,itype:w,itype:p # 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 -- 2.39.5