]> git.koha-community.org Git - koha.git/commit
Bug 7818: Zebra DOM filter index definitions for MARC21 bibs
authorGalen Charlton <gmc@esilibrary.com>
Mon, 26 Mar 2012 05:16:11 +0000 (01:16 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 25 Jun 2012 21:17:25 +0000 (09:17 +1200)
commit94f11f65c487e06e1cf9332b664e82e243eea73b
treea8c8abb01e768c5f59541b6cb88dfaca0a44cdc1
parentbe9d86d3db14c06120640c71d8e5e699ccd391ca
Bug 7818: Zebra DOM filter index definitions for MARC21 bibs

The file biblio-zebra-indexdefs.xsl, which is the stylesheet that
is used by the Zebra DOM filter to convert an incoming MARC21 bib
to its indexed form, was generated by the following two steps:

misc/maintenance/make_zebra_dom_cfg_from_record_abs \
  --input  etc/zebradb/marc_defs/marc21/biblios/record.abs \
  --output etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml

xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl \
  etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml \
  > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl

Records indexed using this XSLTshould behave similarly to records
indexed using the GRS-1 filter and the old record.abs definition, with
the following big exception (and improvemwent): indexed phrases now
span subfield boundaries if a specific subfield wasn't specified in the
index definition.  For example, the GRS-1 filter index definition

melm 245 Title

would allow 245 $a Cats on boxes : $b cardboard fantasies

to be searched as the phrases "cats on boxes" or "cardboard fantasies",
but a title phrase seach of "cats on boxes cardboard fantasises"
wouldn't work.  The DOM filter equivalent,

<index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="245">
  <target_index>Title:w</target_index>
  <target_index>Title:p</target_index>
</index_data_field>

*does* allow phrase searches to span subfield boundaries.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml [new file with mode: 0644]
etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl [new file with mode: 0644]