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)
committerPaul Poulain <paul.poulain@biblibre.com>
Sat, 9 Jun 2012 09:44:06 +0000 (11:44 +0200)
commit64680c18b35510d07c9c0da6868a13e9dcb83952
treecd1c5f71d4f92c4f23bd0ed504a831b9459936e5
parent76378ed2021df3b8ddca27547ae0812bec621a20
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>
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]