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 915d585b50)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f382f4a271)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Janusz Kaczmarek 2024-04-11 09:21:42 +00:00 committed by Lucas Gass
parent 188ff949df
commit fe41a554fa

View file

@ -1974,7 +1974,7 @@ biblios:
sort: 1 sort: 1
suggestible: '' suggestible: ''
- facet: '' - facet: ''
marc_field: 020a marc_field: 020az
marc_type: marc21 marc_type: marc21
sort: 1 sort: 1
suggestible: '' suggestible: ''
@ -2065,6 +2065,23 @@ biblios:
marc_type: marc21 marc_type: marc21
sort: 1 sort: 1
suggestible: '' suggestible: ''
- facet: ''
marc_field: 010a
marc_type: unimarc
sort: 1
suggestible: ''
opac: 1
staff_client: 1
type: isbn
isbn-all:
label: isbn-all
mandatory: ~
mappings:
- facet: ''
marc_field: 020az
marc_type: marc21
sort: 1
suggestible: ''
- facet: '' - facet: ''
marc_field: 010az marc_field: 010az
marc_type: unimarc marc_type: unimarc