Koha/admin
Thomas Klausner 342c65a680 Bug 36269: Elasticsearch: publisher-location (pl) should use260a/264a
Currently the index `pl` points to 008/15-17. It should
(additionally/instead?) point to 260a and/or 264a.

Test plan (for koha-testing-docker with ElasticSearch via `ktd --es7 up`)

Verify the old/broken behaviour:

* Go to Staff/Advanced Search
* Select "Publisher Location" and enter "cau", start search
* You will get some hits (~16), eg "Perl best practices / Damian Conway", which has 008 of "051222s2005 caua b 001 0 eng d" with "cau" on 15-17
* Edit this record (cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=5)
* Inspect 260$a, which should containt "Sebastopol, CA :"
* Go back to Advanced Search and search for  "Publisher Location" = "Sebastopol"
* No hits!

Apply the patch!

* exit ktd and stop it (ktd --es7 down; ktd --es7 stop)
* start it again
* Go to Staff / Administration / Search Engine Config (Elasticsearch)
* Click on the Tab "Bibliographic records" and search/filter for "pl"
* you should see 3 entries for "pl", with Mapping values of "008_/15-17", "260a" and "264a"
* Go to Search,
* Select "Publisher Location" and enter "cau", start search
* same hits as befor
* Search again, but for "Sebastopol"
* Now you'll get 9 hits!!

Bonus: Test 264a

* Got to Admin / MARC bibl framework, select BKS -> MARC structure
* search for tag "264", edit subfields
* in tabs a, b, c: Check the "Editor" Checkbox (Visibility)
* Save changes
* find a book, eg again "Perl best practices" and edit it
* find field 264 and enter "Test" into  264a, Save
* Depending on your setup, you might have to manually re-index the book:
  * enter ktd: ktd --shell
  * reindex the one book (via --bn) or all (might also need a -d)
    /usr/share/koha/bin/search_tools/rebuild_elasticsearch.pl -v -b -d
* Go again to Advanced Search, Publisher Location = "Test"
* You should find the book

If your NOT running ktd, you might be able to just edit the ElasticSearch Mappings to add / change the mapping for "pl" to point to "260a".

One rather harsh way to do this (which I needed to do, because the ES Mappings UI did not work for me) is via this SQL:
update search_marc_map set marc_field='260a' where marc_field='008_/15-17';

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit df9bc0b86a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-05-23 11:24:00 +02:00
..
searchengine/elasticsearch Bug 36269: Elasticsearch: publisher-location (pl) should use260a/264a 2024-05-23 11:24:00 +02:00
additional-fields.pl Bug 35190: Adjust UI handling to avoid inserting an empty string 2023-11-03 14:22:47 -03:00
admin-home.pl Bug 31401: Update administration sidebar to match entries on administration start page 2022-09-07 13:55:32 -07:00
adveditorshortcuts.pl
aqbudgetperiods.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
aqbudgets.pl
aqcontract.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
aqplan.pl Bug 28327: Unify CSV delimiter special behavior for tabulation 2022-08-19 15:53:12 -03:00
audio_alerts.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
auth_subfields_structure.pl Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
auth_tag_structure.pl
authorised_values.pl Bug 31976: Incorrect default category selected by authorized values page 2022-10-27 09:46:58 -03:00
authtypes.pl
background_jobs.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
biblio_framework.pl Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
branch_transfer_limits.pl Bug 18247: Remove SQL queries from branch_transfer_limit.pl 2023-01-27 16:10:22 -03:00
branches.pl Bug 32721: (QA follow-up) Drop fields from API response 2023-10-19 16:00:56 -03:00
cash_registers.pl
categories.pl Bug 35263: (QA follow-up) Update code 2023-11-08 09:58:53 -03:00
check_budget_parent.pl
check_parent_total.pl
checkmarc.pl
cities.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
classsources.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
clone-rules.pl
columns_settings.pl Bug 35278: Fix warn from column_settings.pl 2023-11-09 14:42:27 -03:00
columns_settings.yml Bug 35306: Fix Expired holds when modding request 2023-11-14 10:32:37 -03:00
credit_types.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
curbside_pickup.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
currency.pl
debit_types.pl Bug 32450: Noissuescharge debit type exclusions 2023-05-17 10:25:06 -03:00
desks.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
didyoumean.pl
edi_accounts.pl Bug 34261: Add missing argument to show_account 2023-07-14 15:23:16 -03:00
edi_ean_accounts.pl
identity_providers.pl Bug 32139: Set "update on login" correctly when creating new IdP 2022-11-09 13:32:46 -03:00
ill_batch_statuses.pl Bug 30719: (QA follow-up) Squash: 2023-10-17 14:45:18 -03:00
import_export_authtype.pl Bug 13952: (follow-up) JS translatability, clean warns, other 2022-04-04 16:23:46 +02:00
import_export_framework.pl Bug 13952: (follow-up) Fixing export on default biblio framework 2022-04-04 16:23:45 +02:00
item_circulation_alerts.pl Bug 32122: Correct permissions check on item circulation alerts 2022-11-07 11:17:40 -03:00
items_search_field.pl Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers 2023-10-17 14:45:29 -03:00
items_search_fields.pl Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers 2023-10-17 14:45:29 -03:00
itemtypes.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
koha2marclinks.pl Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
library_groups.pl Bug 9525: (QA follow-up) Tidy 2023-10-04 16:40:12 -04:00
localization.pl
marc-overlay-rules.pl Bug 33335: (QA follow-up) Polishing and comments 2023-05-12 17:50:09 -03:00
marc_subfields_structure.pl Bug 34393: Fix inconsistencies in MARC bibliographic framework page titles, breadcrumbs, and header 2023-10-09 11:41:30 -03:00
marctagstructure.pl Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
matching-rules.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
oai_set_mappings.pl Bug 32797: Check if fields have a value, not if true 2023-02-03 10:30:07 -03:00
oai_sets.pl
overdrive.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
patron-attr-types.pl Bug 34517: Add option search patron attributes by default 2023-11-09 10:15:07 -03:00
preferences.pl Bug 31731: Offer user a dropdown of authorized values instead of a text field in preferences 2023-10-10 10:54:00 -03:00
restrictions.pl Bug 16223: Tidy 2023-10-11 12:13:12 -03:00
search_filters.pl Bug 17170: Minor fixes 2022-10-21 11:15:21 -03:00
share_content.pl
smart-rules.pl Bug 36447: Circ rules slow to load when many itemtypes and categories 2024-04-17 17:22:53 +02:00
sms_providers.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
smtp_servers.pl Bug 34616: Fix showing default server info on edit SMTP server page 2023-09-01 11:07:30 -03:00
sru_modmapping.pl
systempreferences.pl Bug 34369: Require CSRF token for updating system preferences 2023-09-25 18:18:40 -03:00
transfer_limits.pl
transport-cost-matrix.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
usage_statistics.pl
z3950servers.pl