Bugzilla – Attachment 39735 Details for
Bug 14198
RDA: Indexing 264 field (Zebra)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14198: RDA: Indexing 264 field (Zebra) # 1/2
Bug-14198-RDA-Indexing-264-field-Zebra.patch (text/plain), 9.27 KB, created by
Héctor Eduardo Castro Avalos
on 2015-06-01 04:31:13 UTC
(
hide
)
Description:
Bug 14198: RDA: Indexing 264 field (Zebra) # 1/2
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2015-06-01 04:31:13 UTC
Size:
9.27 KB
patch
obsolete
>From c18d024c14c6718b0597bd74a16328ffc20d4dee Mon Sep 17 00:00:00 2001 >From: Hector Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> >Date: Sun, 31 May 2015 20:54:58 -0600 >Subject: [PATCH] Bug 14198: RDA: Indexing 264 field (Zebra) > >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 patch. >6) Rebuild your zebra but this time all biblio records. >7) Search again with pb:Bethany, this time will appear the two records, 264 is indexed. >8) This patch add three new indexes Provider, Provider-date and Provider-place for 260 and 264 fields. >9) Do a search with the three new indexes for Bethany publisher. >10) Search with copydate:2013 and Provider-date:2013 both searches will give the same result. >11) Apply QA Test Tools > >Sponsored-by: Universidad de El Salvador >--- > C4/Search.pm | 3 ++ > etc/zebradb/biblios/etc/bib1.att | 3 ++ > etc/zebradb/ccl.properties | 9 ++++ > .../marc21/biblios/biblio-koha-indexdefs.xml | 32 +++++++++++++- > .../marc21/biblios/biblio-zebra-indexdefs.xsl | 44 ++++++++++++++++++-- > 5 files changed, 86 insertions(+), 5 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 990ed39..080d9d9 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1198,6 +1198,9 @@ sub getIndexes{ > 'popularity', > 'pubdate', > 'Publisher', >+ 'Provider', >+ 'Provider-place', >+ 'Provider-date', > 'Record-control-number', > 'rcn', > 'Record-type', >diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att >index ed8c64b..d8369b2 100644 >--- a/etc/zebradb/biblios/etc/bib1.att >+++ b/etc/zebradb/biblios/etc/bib1.att >@@ -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 >@@ -219,6 +220,8 @@ att 9009 cn-prefix > att 9010 cn-suffix > att 9011 Suppress > att 9012 Identifier-other >+att 9014 Provider-place >+att 9015 Provider-date > > # Items Index > att 8001 withdrawn >diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties >index 99e3498..48ec428 100644 >--- a/etc/zebradb/ccl.properties >+++ b/etc/zebradb/ccl.properties >@@ -578,6 +578,15 @@ 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 >+Provider-place 1=9014 >+Provider-date 1=9015 >+ > #Note 63 A concise statement in which 5XX > # such information as extended > # physical description, >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 8ad9db1..37d060b 100644 >--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >@@ -416,21 +416,51 @@ > <index_subfields tag="260" subfields="a"> > <target_index>pl:w</target_index> > <target_index>pl:p</target_index> >+ <target_index>Provider-place:w</target_index> >+ <target_index>Provider-place:p</target_index> > </index_subfields> > <!--record.abs line 120: melm 260$b Publisher:w,Publisher:p--> > <index_subfields tag="260" subfields="b"> > <target_index>Publisher:w</target_index> > <target_index>Publisher:p</target_index> >+ <target_index>Provider:w</target_index> >+ <target_index>Provider:p</target_index> > </index_subfields> > <!--record.abs line 121: melm 260$c copydate,copydate:s--> > <index_subfields tag="260" subfields="c"> > <target_index>copydate:w</target_index> > <target_index>copydate:s</target_index> >+ <target_index>Provider-date:w</target_index> >+ <target_index>Provider-date:s</target_index> > </index_subfields> > <!--record.abs line 122: melm 260 pl--> > <index_data_field tag="260"> > <target_index>pl:w</target_index> >- </index_data_field> >+ <target_index>Provider:w</target_index> >+ </index_data_field> >+ <!--Index for RDA 264 field--> >+ <index_subfields tag="264" subfields="a"> >+ <target_index>pl:w</target_index> >+ <target_index>pl:p</target_index> >+ <target_index>Provider-place:w</target_index> >+ <target_index>Provider-place:p</target_index> >+ </index_subfields> >+ <index_subfields tag="264" subfields="b"> >+ <target_index>Publisher:w</target_index> >+ <target_index>Publisher:p</target_index> >+ <target_index>Provider:w</target_index> >+ <target_index>Provider:p</target_index> >+ </index_subfields> >+ <index_subfields tag="264" subfields="c"> >+ <target_index>copydate:w</target_index> >+ <target_index>copydate:s</target_index> >+ <target_index>Provider-date:w</target_index> >+ <target_index>Provider-date:s</target_index> >+ </index_subfields> >+ <index_data_field tag="264"> >+ <target_index>pl:w</target_index> >+ <target_index>Provider:w</target_index> >+ </index_data_field> > <!--record.abs line 123: melm 300 Extent:w,Extent:p--> > <index_data_field tag="300"> > <target_index>Extent: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 a0f68f1..61920ba 100644 >--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >@@ -320,21 +320,44 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <xslo:template mode="index_subfields" match="marc:datafield[@tag='260']"> > <xslo:for-each select="marc:subfield"> > <xslo:if test="contains('a', @code)"> >- <z:index name="pl:w pl:p"> >+ <z:index name="pl:w pl:p Provider-place:w Provider-place:p"> > <xslo:value-of select="."/> > </z:index> > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> > <xslo:if test="contains('b', @code)"> >- <z:index name="Publisher:w Publisher:p"> >+ <z:index name="Publisher:w Publisher:p Provider:w Provider:p"> > <xslo:value-of select="."/> > </z:index> > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> > <xslo:if test="contains('c', @code)"> >- <z:index name="copydate:w copydate:s"> >+ <z:index name="copydate:w copydate:s Provider-date:w Provider-date:s"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:if> >+ </xslo:for-each> >+ </xslo:template> >+ <xslo:template mode="index_subfields" match="marc:datafield[@tag='264']"> >+ <xslo:for-each select="marc:subfield"> >+ <xslo:if test="contains('a', @code)"> >+ <z:index name="pl:w pl:p Provider-place:w Provider-place:p"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:if> >+ </xslo:for-each> >+ <xslo:for-each select="marc:subfield"> >+ <xslo:if test="contains('b', @code)"> >+ <z:index name="Publisher:w Publisher:p Provider:w Provider:p"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:if> >+ </xslo:for-each> >+ <xslo:for-each select="marc:subfield"> >+ <xslo:if test="contains('c', @code)"> >+ <z:index name="copydate:w copydate:s Provider-date:w Provider-date:s"> > <xslo:value-of select="."/> > </z:index> > </xslo:if> >@@ -1840,7 +1863,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() > 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="pl:w Provider:w"> > <xslo:variable name="raw_heading"> > <xslo:for-each select="marc:subfield"> > <xslo:if test="position() > 1"> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14198
:
39301
|
39317
|
39735
|
39791
|
40941
|
42364
|
43855