From b7587a71821c416e676bd6d9344724d56270ccb8 Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Thu, 11 Apr 2024 18:02:14 +0000 Subject: [PATCH] Bug 36584: Add fields 520, 561, and 563 (MARC 21) to ES note search field With Zebra, the general keyword search covered the entire record content, even if the field was not explicitly indexed with a Zebra index (the Any index). With Elasticsearch only the content of the fields explicitly indexed can be found with general keyword search. This is OK, to some extent, but with the current configuration it hides the content fo some important notes from the searches, and librarians complained about that: 520 - Summary, etc., 561 - Ownership and Custodial History, 563 - Binding Information. This patch adds the content of 520, 561, and 563 fields to the 'note' search field. Test plan ========= 1. Have an installation with Elasticsearch. 2. Add some information to the 520, 561, and/or 563 fields (561 is hidden in the default framework--one should enable it to be able to use the 561 field). Save teh record. 3. Try to find the record with the general keyword search, with the words you used. If they were specific enough, you will get no results. 4. Apply the patch, reindex with: sudo koha-elasticsearch --rebuild -r -b kohadev 5. Confirm that now you are able to find the record with the information you entered. --- admin/searchengine/elasticsearch/mappings.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml index 9cd3db5c96..8073bb795b 100644 --- a/admin/searchengine/elasticsearch/mappings.yaml +++ b/admin/searchengine/elasticsearch/mappings.yaml @@ -2905,6 +2905,21 @@ biblios: marc_type: marc21 sort: 1 suggestible: '' + - facet: '' + marc_field: '520' + marc_type: marc21 + sort: 1 + suggestible: '' + - facet: '' + marc_field: '561' + marc_type: marc21 + sort: 1 + suggestible: '' + - facet: '' + marc_field: '563' + marc_type: marc21 + sort: 1 + suggestible: '' - facet: '' marc_field: '590' marc_type: marc21 -- 2.30.2