Koha-clms/admin
Nick Clemens c2be412ade 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>
(cherry picked from commit ce161fda9b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5597b666e4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 13:54:22 +13:00
..
searchengine/elasticsearch Bug 25273: Make match-heading rely on authority type configuration 2020-10-20 13:54:22 +13:00
add_user_search.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
additional-fields.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
admin-home.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
adveditorshortcuts.pl Bug 24663: [19.11.x] Force auth in adveditorshortcuts.pl 2020-08-25 15:45:49 +12:00
aqbudgetperiods.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
aqbudgets.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
aqcontract.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
aqplan.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
audio_alerts.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
auth_subfields_structure.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
auth_tag_structure.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
authorised_values.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
authtypes.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
biblio_framework.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
branch_transfer_limits.pl Bug 14391: Add granular permissions to the administration module 2018-11-07 12:29:32 +00:00
branches.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
cash_registers.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
categories.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
check_budget_parent.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
check_parent_total.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
checkmarc.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
cities.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
classsources.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
clone-rules.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
columns_settings.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
columns_settings.yml Bug 25557: Correct basket.pl column config 2020-06-17 12:15:53 +12:00
currency.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
debit_types.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
didyoumean.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
edi_accounts.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
edi_ean_accounts.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
import_export_framework.pl Bug 23398: Disable the XML import/export format for biblio framework 2019-11-08 12:51:16 +00:00
item_circulation_alerts.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
items_search_field.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
items_search_fields.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
itemtypes.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
koha2marclinks.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
library_groups.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
localization.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
marc_subfields_structure.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
marctagstructure.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
matching-rules.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
oai_set_mappings.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
oai_sets.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
overdrive.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
patron-attr-types.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
preferences.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
printers.pl Bug 14391: Add granular permissions to the administration module 2018-11-07 12:29:32 +00:00
share_content.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
smart-rules.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
sms_providers.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
sru_modmapping.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
systempreferences.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
transport-cost-matrix.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
usage_statistics.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00
z3950servers.pl Bug 24663: [19.11.x] Remove authnotrequired if set to 0 2020-08-25 15:45:46 +12:00