Bug 36554: Document languages from field 041 should be present in 'ln' search field...
authorJanusz Kaczmarek <januszop@gmail.com>
Tue, 14 Mar 2023 13:22:27 +0000 (14:22 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 24 May 2024 14:04:46 +0000 (16:04 +0200)
commit9b1f7dfa320fc1ba1e176cb18d75c6c51c20bf23
tree97d7ebbaf0e180040028c203462d28a71ffa0c28
parenteee4ebf0e78cc3dfe13c9f4e736f3107fb42bd02
Bug 36554: Document languages from field 041 should be present in 'ln' search field and Languages facet (MARC 21)

In Elasticsearch, the field 041 (subfields: a, d, e, i, j)
is not indexed with 'ln' search field.  As a result, records cannot
be found when searching with languages present in 041 (but only
with the one from 008/35-37), and the languages are also missing
from the facet.

Subfields content (only relevant subfields):
$a - Language code of text/sound track or separate title
$d - Language code of sung or spoken text
$e - Language code of librettos
$i - Language code of intertitles
$j - Language code of subtitles

Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a language present
   in 041 a/d/e/i/j but not in 008/35-37, e.g. for Japanese (with ln:jpn
   or from Advance search).  You will get no results.
2. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
3. Repeat the test. You should get some records and also you should see
   the Japanese language in the Languages facet.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d90c2a44e7506ec47a4f9481a1b8693b99244ecb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
admin/searchengine/elasticsearch/mappings.yaml