Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21
authorJanusz Kaczmarek <januszop@gmail.com>
Thu, 11 Apr 2024 09:21:42 +0000 (09:21 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 24 May 2024 13:09:37 +0000 (15:09 +0200)
commitf382f4a271abffd012cc3df1dda947c99dd0a0b5
tree8b8fa43aafc341025bbd58d8204d2741f7e8b679
parent6302ec6200fb26f38edbc1a5e127431108dc54a9
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21

For MARC 21, canceled/invalid ISBNs (subfield 020 $z) are not being
indexed in Elasticsearch (search fields identifier-standard and isbn),
but it is for UNIMARC (subfield 010 $z).  As a result, a user searching
for such an ISBN (e.g. with wrong checksum--and therefor put in 020 $z)
will not find the record in the catalogue.

A new isbn-all Elasticsearch search field 'isbn-all' has been created with
020az (MARC 21, and 010az for UNIMARC), 010z has been removed from isbn
search field for UNIMARC, and 020z has been added to identifier-standard
search field.

Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a cancelled ISBN
   e.g. 9780007269854.  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 "The ice princess / Camilla Läckberg".

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