Bug 36584: Add fields 520, 561, and 563 (MARC 21) to ES note search field
authorJanusz Kaczmarek <januszop@gmail.com>
Thu, 11 Apr 2024 18:02:14 +0000 (18:02 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 6 May 2024 09:18:13 +0000 (11:18 +0200)
commit70eefbdce72e83a5c5af0de2ec3e81c6a59fc225
treecc9386b737c61c58b72f569c10cd1dff2a976629
parentd4b7fc521e69b201bfcdd6132b60c1335d7add58
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.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
admin/searchengine/elasticsearch/mappings.yaml