Bug 14617: Add fields to ISBN and ISSN indexes: 020$z, 022$y, 022$z

1) Import MARC21 bibs containing

- ISBN in 020$z
- ISSN in 022$y
- ISSN in 022$z

2) Make sure that bibs are indexed

3) Search by ISBN and ISSN above -- bibs should not show in search.

4) Apply patch, re-index

5) Search again; ISBN in 020$z and ISSN in 022$y and 022$z should return
results.

Signed-off-by: kholten@switchinc.org
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Barton Chittenden 2015-10-06 06:22:56 -07:00 committed by Tomas Cohen Arazi
parent de8076157e
commit cab481dbb2
2 changed files with 33 additions and 0 deletions

View File

@ -117,6 +117,10 @@
<target_index>ISBN:w</target_index>
<target_index>Identifier-standard:w</target_index>
</index_subfields>
<index_subfields tag="020" subfields="z">
<target_index>ISBN:w</target_index>
<target_index>Identifier-standard:w</target_index>
</index_subfields>
<!--record.abs line 55: melm 020 Identifier-standard-->
<index_data_field tag="020">
<target_index>Identifier-standard:w</target_index>
@ -126,6 +130,14 @@
<target_index>ISSN:w</target_index>
<target_index>Identifier-standard:w</target_index>
</index_subfields>
<index_subfields tag="022" subfields="y">
<target_index>ISSN:w</target_index>
<target_index>Identifier-standard:w</target_index>
</index_subfields>
<index_subfields tag="022" subfields="z">
<target_index>ISSN:w</target_index>
<target_index>Identifier-standard:w</target_index>
</index_subfields>
<!--record.abs line 57: melm 022 Identifier-standard-->
<index_data_field tag="022">
<target_index>Identifier-standard:w</target_index>

View File

@ -140,6 +140,13 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
</z:index>
</xslo:if>
</xslo:for-each>
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('z', @code)">
<z:index name="ISBN:w Identifier-standard:w">
<xslo:value-of select="."/>
</z:index>
</xslo:if>
</xslo:for-each>
</xslo:template>
<xslo:template mode="index_subfields" match="marc:datafield[@tag='022']">
<xslo:for-each select="marc:subfield">
@ -149,6 +156,20 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
</z:index>
</xslo:if>
</xslo:for-each>
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('y', @code)">
<z:index name="ISSN:w Identifier-standard:w">
<xslo:value-of select="."/>
</z:index>
</xslo:if>
</xslo:for-each>
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('z', @code)">
<z:index name="ISSN:w Identifier-standard:w">
<xslo:value-of select="."/>
</z:index>
</xslo:if>
</xslo:for-each>
</xslo:template>
<xslo:template mode="index_subfields" match="marc:datafield[@tag='024']">
<xslo:for-each select="marc:subfield">