From c75b90391e88116f2e9f2840b753ea87928264bc Mon Sep 17 00:00:00 2001 From: danyonsewell Date: Wed, 1 May 2024 03:41:13 +0000 Subject: [PATCH] Bug 36723: Add musical presentation to Elasticsearch index mappings Have written a patch to allow Musical Presentation to be a search option within Elasticsearch index mappings Test plan: 1. Apply this patch 2. Ensure MARC index 254 (Musical Presentation) is visible to edit on the default MARC bibliographic framework Koha Administration > MARC Bibliographic framework > Actions (under default framework) > MARC structure > Search 254 and actions->edit subfield > tick box for visibility should have OPAC, Staff Interface and Editor ticked. 3. Edit a record using the default MARC bibliographic framework and put a search term under index 254 and save. 4. Head back to the home page and go to Advanced Search 5. under the Search for dropdown select Musical presentation and in the search field enter the search term you used in step 3. Your results should appear Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind --- admin/searchengine/elasticsearch/mappings.yaml | 12 ++++++++++++ .../prog/en/includes/search_indexes.inc | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml index 16aaabfdbb..2713de1dd1 100644 --- a/admin/searchengine/elasticsearch/mappings.yaml +++ b/admin/searchengine/elasticsearch/mappings.yaml @@ -2697,6 +2697,18 @@ 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: '' 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 %] -- 2.39.2