Bug 36574 - Canceled/invalid ISBN not indexed by ES for MARC 21
Summary: Canceled/invalid ISBN not indexed by ES for MARC 21
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Janusz Kaczmarek
QA Contact:
URL:
Keywords: release-notes-needed
: 36726 (view as bug list)
Depends on:
Blocks: 36798
  Show dependency treegraph
 
Reported: 2024-04-11 09:21 UTC by Janusz Kaczmarek
Modified: 2024-05-16 11:41 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21 (1.72 KB, patch)
2024-04-11 09:29 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Revert "Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21" (1.04 KB, text/plain)
2024-04-11 19:19 UTC, Roman Dolny
Details
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21 (1.77 KB, patch)
2024-04-12 07:58 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21 (2.31 KB, patch)
2024-04-12 09:02 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21 (2.37 KB, patch)
2024-05-01 10:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2024-04-11 09:21:02 UTC
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.
Comment 1 Janusz Kaczmarek 2024-04-11 09:29:52 UTC
Created attachment 164667 [details] [review]
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.

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".
Comment 2 Roman Dolny 2024-04-11 19:19:08 UTC
Created attachment 164778 [details]
Revert "Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21"

This reverts commit 019e80dbbeaccfae732c59c5590da6e5a29f329b.
Comment 3 Roman Dolny 2024-04-11 20:35:04 UTC
(In reply to Roman Dolny from comment #2)
> Created attachment 164778 [details] [review]
> Revert "Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21"
> 
> This reverts commit 019e80dbbeaccfae732c59c5590da6e5a29f329b.

Janusz, sorry for canceling the commit. My mistake while trying to sign the patch.
Comment 4 Roman Dolny 2024-04-12 07:58:36 UTC
Created attachment 164799 [details] [review]
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.

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>
Comment 5 Janusz Kaczmarek 2024-04-12 09:02:04 UTC
Created attachment 164807 [details] [review]
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>
Comment 6 Janusz Kaczmarek 2024-04-30 12:14:59 UTC
*** Bug 36726 has been marked as a duplicate of this bug. ***
Comment 7 Nick Clemens (kidclamp) 2024-05-01 10:42:22 UTC
Created attachment 165956 [details] [review]
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>
Comment 8 Katrin Fischer 2024-05-03 14:04:01 UTC
Pushed for 24.05!

Well done everyone, thank you!