Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Switching to dom indexing

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

If you started using Koha before 3.14, your system may still be using GRS1 indexing. You have to make a few changes to koha-conf.xml if you want to switch to DOM indexing. The following should work for a package installation. If you have done personalization (for example add/modify an index) you need to port your modifications in standard dom configuration.

koha-conf.xml

Make a backup of the file before you start!

In the section beginning with something like

 <server id="biblioserver"  listenref="biblioserver">
     <directory>/var/lib/koha/koha/biblios</directory>

change

     <config>/etc/koha/sites/koha/zebra-biblios.cfg</config>

to

     <config>/etc/koha/sites/koha/zebra-biblios-dom.cfg</config>

The only important thing is adding '-dom' to the filename. if your path is different, keep it that way! If the file is not in that path the steps to created is in the next section.

Then after the line

     <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>

add the following lines

     <xi:include href="/etc/koha/zebradb/retrieval-info-bib-dom.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude">
     <xi:fallback>

and after the <retrievalinfo> section that looks like this

      <retrievalinfo>
        …
      </retrievalinfo>

include

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

At the end of the file, right before </config>, include

 <zebra_bib_index_mode>dom</zebra_bib_index_mode>
 <zebra_auth_index_mode>dom</zebra_auth_index_mode>
 <use_zebra_facets>1</use_zebra_facets>

(or change the values to the ones shown here, if the entries are already in the file.)

Save the file.


zebra-biblios.cfg

On a package installation, the correct zebra-biblios-dom.cfg is already present these days. If you installed in a different way, you also have to change this configuration file to use DOM.

Copy zebra-biblios.cfg to zebra-biblios-dom.cfg and open zebra-biblios-dom.cfg

At the end of the line beginning with

 profilePath …

append (to the same line)

 :/etc/koha/zebradb/xsl

Comment out the GRS1-related things

 # Can use -g iso2709 to batch index raw iso2709 records in a single or
 # multiple files, or marcxml records that are split into separate files
 # the trailing .record tells zebraidx to use record.abs
 # iso2709.recordType:grs.marcxml.record
 
 # Can use -g marcxml to batch index marcxml files
 # zebraidx uses record.abs because of <record> is the root element
 # marcxml.recordType:grs.sgml
 
 # Koha uses grs.xml internally when updating a single record, no idea
 # why it knows to use record.abs
 # recordType:grs.xml

and insert

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

After the following part

 recordId: (bib1,Local-number)
 storeKeys:1
 storeData:1

add

 facetNumRecs:1000

And save the file.

Restart Zebra with

 koha-restart-zebra instancename

Rebuild Zebra with

 koha-rebuild-zebra -f -v instancename

In the staff client, open About Koha > System information and check that there are no GRS1/DOM-related warnings.