Bug 18017: Use index_heading and index_match_heading in UNIMARC authorities zebra...
authorFridolin Somers <fridolin.somers@biblibre.com>
Tue, 22 Dec 2020 10:07:03 +0000 (11:07 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 29 Apr 2021 09:20:07 +0000 (11:20 +0200)
commit0a53543d51a34f6a61803204f04e4229d88c2d67
tree476e729d7b07d79bed27a0f36946e6b4e2f89ba8
parent07f77d90313bbc1095f16339bf1b271e95c50a14
Bug 18017: Use index_heading and index_match_heading in UNIMARC authorities zebra configuration

For a good management of autorities linking to biblio records,
MARC21 uses index_heading and index_match_heading in authorities zebra configuration.
UNIMARC configuration must use the same.

This patch adds in UNIMARC authorities zebra configuration index_heading and index_match_heading to earch heading
in order to be maximum close to MARC21 authorities zebra configuration.
See changes made in MARC21 :
https://git.koha-community.org/Koha-community/Koha/commit/32cf2af700dfea15d9c4f99bee97e97c85643896

It fixes some indexes names : Personal-name-see => Personal-name-see-from

Removes useless Term-geographic index, a duplicate of Name-geographic.

Sometimes parallel 7xx form whas only on $a, it must contains same subfields
has the main heading.

Test plan :
===========
1.0) Use a UNIMARC install without patch
1.1) Set sysprefs
     BiblioAddsAuthorities = ON
     AutoCreateAuthorities = ON
     LinkerModule = First Match
1.2) Replace authorities zebra configuration files
     cp $KOHA_CLONE/etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml $KOHA_CONF_DIR/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml
     cp $KOHA_CLONE/etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl $KOHA_CONF_DIR/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl
1.3) Restart zebra server and indexer services
1.4) Reindex authorities
     ./misc/migration_tools/rebuild_zebra.pl -r -a -v
1.5) Search in Z3950 a record with complex heading (with subdivisions),
     for example ISBN 2877620115 "Facteurs culturels et sociaux de la santé en Afrique de l'Oues"
1.6) Import this record and save it : authorities are created
     go to staff:/cgi-bin/koha/cataloguing/addbooks.pl
1.7) Reimport the same record (when asked, say that it's not a duplicate)
1.8) The authority should have been duplicated :
     different url and different $9 value
2.0) Apply this patch
2.1) Replace again the authorities zebra configuration files
2.2) Restart zebra server and indexer services
2.3) Reindex authorities
2.4) Reimport the same record
2.5) The authority should have not been duplicated. Compare with both
       existing records to see which the 3rd has been matched against.
3.0) Play with authorities search to check every mode :
     Search main heading ($a only)
     Search main heading
     Search all headings
     Search entire record

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bb83da9b1d6578ef2c8c6b8e447283324f1e4435)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml
etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl