From 8ec8a5a98561423988c71aab29832911f9db22dd Mon Sep 17 00:00:00 2001 From: danyonsewell Date: Thu, 9 May 2024 04:11:42 +0000 Subject: [PATCH] Bug 36723: Add musical presentation to Elasticsearch index mappings Apologies for the mess all, I seem to have accidentally obsoletted the previous patches instead of writing a follow-up This comment is intended to squash all the individual commits into one patch. As for the index not being defined for Zebra at all, would it be worthwhile for me to define it for zebra too? Testing plan: 1. Start up KTD with Elasticsearch: ktd --es8 up 2. Apply the patch and restart everything (restart_all). 3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page) 4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev 5. Alternative to steps 3 and 4: reset_all 6. Update the visibility for 254$a in the default framework so that it is visible in the Editor (OPAC, Staff interface should already be selected). 7. Add a new record using the default framework and put a term in 254$a, such as 'Full score'. 8. Use the advanced search. For the keyword indexes, 'Musical presentation' is now listed. 9. Search for the term you added for the record in step 6. 10. Do this for both the Opac and Staff Client. Sponsored-by: Education Services Australia SCIS --- .../searchengine/elasticsearch/mappings.yaml | 24 +++++++++++++++++++ .../prog/en/includes/search_indexes.inc | 5 ++++ .../bootstrap/en/modules/opac-advsearch.tt | 1 + 3 files changed, 30 insertions(+) diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml index 16aaabfdbb..5cdd3abf59 100644 --- a/admin/searchengine/elasticsearch/mappings.yaml +++ b/admin/searchengine/elasticsearch/mappings.yaml @@ -2697,6 +2697,30 @@ biblios: opac: 1 staff_client: 1 type: '' + musical-presentation: + label: musical-presentation + mandatory: ~ + mappings: + - facet: '' + marc_field: '254' + marc_type: marc21 + sort: 1 + suggestible: '' + opac: 1 + staff_client: 1 + type: '' + musical-presentation: + label: musical-presentation + mandatory: ~ + mappings: + - facet: '' + marc_field: '254' + marc_type: marc21 + sort: 1 + suggestible: '' + opac: 1 + staff_client: 1 + type: '' nal-call-number: label: nal-call-number mandatory: ~ diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc index f668fdcc9b..9af595fc07 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc @@ -169,6 +169,11 @@ [% ELSE %] [% END %] + [% IF ms_musicaldashpresentation %] + + [% ELSE %] + + [% END %] [%# Use non-normalized st-year instead of st-numeric, %] [%# since pubdate can include 'u' to signify unknown %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt index 21d4d1b025..2accbe4e11 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt @@ -103,6 +103,7 @@ [% ELSE %] [% END %] + -- 2.39.2