Koha-clms/Koha/SearchEngine
Nick Clemens 15b034d36d Bug 27784: Don't parse subdivision authorities as headings
Subdivision authorities are not used for linking, however, they are recognized by
C4::AuthoritiesMarc

While these records are not used for linking, they could provide reference and
should be allowed to exist in the catalog without breaking ES indexing

THis patch simply skips the step of parsing the authorities into the linking form
if the type contains '_SUBD'

To test:
1 - Import a subdivision authority record via Z39 or use the one attached to this bug
2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -d
3 - Authority indexing dies:
   Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
   Use of uninitialized value $tag in regexp compilation at /usr/share/perl5/MARC/Record.pm line 206.
   Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 207.
   Can't call method "tag" on an undefined value at /kohadevbox/koha/C4/Heading.pm line 71.
4 - Apply patches
5 - reindex
6 - Success!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d67fc5e010)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8512ccb446)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 13cdda5ae9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2021-03-23 07:30:04 +01:00
..
Elasticsearch Bug 27252: Add deprecation warning, cross_fields pref, and add version to ES info 2021-01-17 20:45:10 +01:00
Zebra Bug 19365: Fix several issues with the Elasticsearch code 2018-11-26 16:11:01 +00:00
Elasticsearch.pm Bug 27784: Don't parse subdivision authorities as headings 2021-03-23 07:30:04 +01:00
QueryBuilder.pm Bug 12478: allow more granular sorting configuration 2016-04-26 20:20:08 +00:00
Search.pm Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00