Koha/C4
Nick Clemens ce161fda9b Bug 25273: Make match-heading rely on authority type configuration
The match-heading field is a special field used only by the linker, not accessible
to staff or patrons via the interface. This field is used to store the constructed
'search form' used for matching bib headings to authority fields.

In bug 24269 I attempted to use the mappings defined in the inferface and also inject the search term.
This did not work as too many subfields were indexed on their own and leading to false matches.
In this bug we remove the mappings for this field, and create it ourselves during
the indexing process. The C4::Headings module is still used to generate the correct form,
however, the mappings are set based on the authority types in the system. This gives the user
the ability to add new typoes, but prevents mapping changes from breaking linker functionality

To test:
 1 - Start form a sample database with ElasticSearch working
 2 - Download via Z39.50 2 authorities, one of which is a narrower heading of the other, e.g.:
    Waterworks
    Waterworks - Costs
 3 - Place a heading for the broader term in a record. e.g. Waterworks
       In 650$a, without the cataloguing authority plugin. We don't want
       the link created now.
       You need syspref BiblioAddsAuthorities => allow
 4 - Make sure linker is set to default
 5 - Attempt to link the records
       misc/link_bibs_to_authorities.pl
 6 - Linking fails
 7 - Apply patch
 8 - refresh index settings (if using a custom file, remove 'match-heading')
       You can reset mappings in the UI or run this:
       misc/search_tools/rebuild_elasticsearch.pl -v -d -r
 9 - Reindex ES
10 - Try to link again
11 - It succeeds!
12 - Run the tests
     prove t/db_dependent/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 25273: (follow-up)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
..
AuthoritiesMarc Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Barcodes Bug 21395: Fix C4/Barcodes/ValueBuilder.pm 2020-06-29 15:43:41 +02:00
ClassSortRoutine
ClassSplitRoutine Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Creators Bug 25852: Improve C4::Creators::Lib reliability under plack 2020-07-31 10:03:26 +02:00
External Bug 22010: Check preferences for ebook integration 2019-04-30 11:42:51 +00:00
Form
Heading Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
ILSDI Bug 24769: (bug 14711 follow-up) Fix typo in parameter name for AddReserve 2020-05-05 11:03:33 +01:00
Installer Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Labels Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Linker Bug 25189: Don't create authority if results found 2020-06-24 14:31:37 +02:00
Members Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
OAI Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
Output
Patroncards Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Reports Bug 22001: execute reports in an eval 2020-03-31 17:48:14 +01:00
Search Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Serials
SIP Bug 25903: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server 2020-08-24 10:46:13 +02:00
Utils Bug 15400: Display date of birth and age more consistantly 2020-06-29 12:37:02 +02:00
Accounts.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Acquisition.pm Bug 25750: fix fallback to ecost_tax_included/ecost_tax_excluded 2020-07-09 11:50:42 +02:00
Auth.pm Bug 24201: (QA follow-up) Correct call to set_userenv 2020-08-07 16:54:40 +02:00
Auth_cas_servers.yaml.sample
Auth_with_cas.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Auth_with_ldap.pm Bug 20443: Use search_with_library_limits for attribute types 2020-03-23 13:49:22 +00:00
Auth_with_shibboleth.pm Bug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly 2019-12-10 10:43:20 +00:00
AuthoritiesMarc.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
BackgroundJob.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Barcodes.pm
Biblio.pm Bug 25273: Make match-heading rely on authority type configuration 2020-08-31 16:10:25 +02:00
Boolean.pm
Breeding.pm Bug 23542: Fix SRU import encoding 2020-08-12 11:46:25 +02:00
Budgets.pm Bug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules 2020-01-07 13:59:51 +00:00
Calendar.pm Bug 25723: (QA follow-up) Handle holiday and exception on same day 2020-07-20 17:45:31 +02:00
Charset.pm Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
Circulation.pm Bug 22789: (follow-up) Fix atomic update, GUI and more than one hold 2020-08-31 16:10:25 +02:00
ClassSortRoutine.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
ClassSource.pm
ClassSplitRoutine.pm
Context.pm Bug 24201: Attach desk to intranet session 2020-08-07 16:54:40 +02:00
Contract.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
CourseReserves.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Creators.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Debug.pm
Heading.pm Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
HoldsQueue.pm Bug 25799: Add edition information to "Holds queue" report 2020-07-20 17:45:31 +02:00
HTML5Media.pm Bug 20783: Use iframe to embed Youtube videos 2020-06-15 10:32:43 +02:00
Images.pm Revert "Bug 21987: Do not generate true color thumbnails if not needed" 2019-11-04 13:21:53 +00:00
ImportBatch.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
ImportExportFramework.pm
InstallAuth.pm Bug 21395: (QA follow-up) POD fixes 2020-06-29 12:37:02 +02:00
Installer.pm Bug 24973: Load custom localization file 2020-08-24 12:10:53 +02:00
ItemCirculationAlertPreference.pm
Items.pm Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates in 008 2020-08-13 07:55:44 +02:00
Koha.pm Bug 16371: Move GetDailyQuote to get_daily_quote 2020-08-13 10:15:33 +02:00
Labels.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Languages.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Letters.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Linker.pm
Log.pm Bug 23632: Remove C4::Logs::GetLogs 2020-08-18 15:45:48 +02:00
MarcModificationTemplates.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Matcher.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Members.pm Bug 20443: Remove SearchIdMatchingAttribute 2020-03-23 13:49:21 +00:00
Message.pm
NewsChannels.pm Bug 24002: Incorrect DATE value: '00-00-0000' in NewsChannels.pm 2019-11-12 13:49:58 +00:00
Output.pm Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml 2020-06-24 14:31:37 +02:00
Overdues.pm Bug 25127: Use Koha::Number::Price->round for comparison 2020-05-01 15:44:55 +01:00
Patroncards.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Record.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Reports.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Reserves.pm Bug 22789: Add non priority feature to C4 classes and staff interface 2020-08-31 16:10:25 +02:00
Ris.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
RotatingCollections.pm Bug 23695: Set holding branch to transferring branch when manually initiating a transfer 2020-08-18 15:45:48 +02:00
Scheduler.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Scrubber.pm
Search.pm Bug 17661: Trivial simplification using += operator 2020-08-31 16:10:25 +02:00
Serials.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Service.pm
ShelfBrowser.pm Bug 22445: Custom cover images - opac shelfbrowser 2019-10-22 15:02:48 +01:00
SMS.pm
SocialData.pm
Stats.pm Bug 24151: Copy info to the pseudonymized table when a transaction is done 2020-07-20 15:17:42 +02:00
Suggestions.pm Bug 25033: Remove CountSuggestion 2020-08-25 11:31:41 +02:00
Tags.pm Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
Templates.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
TmplToken.pm
TmplTokenType.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
TTParser.pm Bug 25305: Translation process - Open all files specifying the utf8 encoding 2020-05-04 08:50:07 +01:00
UsageStats.pm Bug 24159: Move useDaysMode pref to circulation rules 2020-06-25 10:51:59 +02:00
XISBN.pm Bug 26270: Fix ThingISBN after a change in behaviour 2020-08-24 10:12:47 +02:00
XSLT.pm Bug 24052: Rename XSLT_Handler 2020-03-24 10:42:23 +00:00