Switching to dom indexing

From Koha Wiki

Jump to: navigation, search
Home > Documentation
Home > Documentation > Installation
Home > Documentation > Search Engine > Zebra

Switching to DOM indexing

The bug 7818 add DOM indexing to Koha and zebra. It's the default behaviour when you setup a new Koha. This page intend to list all what you have to do when you update an existing Koha that uses grs1 indexing

Legend: in this page, $ZEBRADIR is the directory where your zebra configuration files are. $KOHA is the directory where Koha source code is.

Updating koha-conf.xml file

koha-conf.xml is the main configuration file of Koha.

You must do the following changes to reflect the new indexing:

After the line

<!-- <maximumrecordsize>2000000</maximumrecordsize> -->

add:

<xi:include href="/home/paul/koha.dev/installs/lecannetdesmaures/etc/zebradb/retrieval-info-bib-dom.xml"
            xmlns:xi="[http://www.w3.org/2001/XInclude http://www.w3.org/2001/XInclude]">
  <xi:fallback>
  <retrievalinfo>

Afther the

</retrievalinfo>

add

 </xi:fallback>
 </xi:include>

Do the same thing for authorities and the retrieval-info-auth-dom.xml file:

After the <useldapserver> line, add:

<zebra_bib_index_mode>dom</zebra_bib_index_mode>
<zebra_auth_index_mode>dom</zebra_auth_index_mode>

updating zebra-biblios.cfg

This file is the biblio configuration file for zebra:

In the profilePath line, add:

:$ZEBRADIR/etc/zebradb/xsl

and comment line:

marcxml.recordType:grs.sgml

before the line recordId: (bib1,Local-number) add

recordtype: dom.$ZEBRADIR/etc/zebradb/biblios/etc/dom-config.xml
marcxml.recordtype: dom.$ZEBRADIR/etc/zebradb/biblios/etc/dom-config.xml
iso2709.recordtype: dom.$ZEBRADIR/etc/zebradb/biblios/etc/dom-config-marc.xml

Copy/generate missing files

If your $KOHA setup is not where your koha source code is, you must copy 2 new files, dom-config-marc.xml and dom-config.xml:

cp $KOHA/etc/zebradb/biblios/etc/*.xml $ZEBRADIR/etc/zebradb/biblios/etc/

If your KOHA setup is not where your koha source code is, you must copy

cp $KOHA/etc/zebradb/retrieval-info-bib-dom.xml $ZEBRADIR/etc/zebradb/

If and only if you do not have the biblio-zebra-indefdex.xsl files for authorities and/or bibs, you will need to generate xsl configuration:

 
$KOHA/misc/maintenance/make_zebra_dom_cfg_from_record_abs --input $ZEBRADIR/zebradb/marc_defs/unimarc/biblios/record.abs --output $ZEBRADIR/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xml
$KOHAGIT/xsltproc $ZEBRADIR/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl $ZEBRADIR/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xml >zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl

However, if you already have those files, you MUST NOT rerun make_zebra_cfg_from_record_abs.

(For recent Debian package, these files seem to be already prepared)