Summary: | Duplicate check in cataloguing fails with Elasticsearch for records with multiple ISBN | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, lucas, michaela.sieber, nick, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.04,22.05.11,21.11.19
|
|
Circulation function: | |||
Attachments: |
Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate
Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate |
Description
Katrin Fischer
2022-08-26 15:57:10 UTC
Ok, I have found the issue: The problem appears for records with multiple ISBN. An example: * Make sure you are using Elasticsearch * Z39.50 target: LOC * Search for: Control number: 14455023 * Import and save * Search for the record again * Import and save - duplicate check hasn't been triggered Taking a closer look: The duplicate check using FindDuplicate will create the search: isbn:1600213510 | 9781600213519 If you search this in the catalog search, it will yield no results with Elasticsearch, but it will indeed work with Zebra, I guess because the | is treated differently in this case. I am not sure how the search for Elasticsearch should be built in order to work reliably, help and hints appreciated! Created attachment 147333 [details] [review] Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate When a record has multiple ISBNs the database stores them seperated by a pipe Zebra interprets a string like "isbn:1600213510 | 9781600213519" as an 'OR' search, but for Elasticsearch we need to explicitly send "OR" - and Zebra support this as well To test: 1 - Make sure you are using Elasticsearch 2 - Cataloging->Add a new record from Z3950 3 - Choose target: LOC 4 - Search for: Control number: 14455023 5 - Import and save 6 - Search for the record again 7 - Import and save - duplicate check isn't been triggered 8 - Apply patch 9 - restart_all 10 - repeat 2-7 11 - this time you should get a duplicate notification 12 - Sitch SearchEngine syspref to 'Zebra' 13 - repeat 2-7 14 - Ensure you still get duplicate notification Created attachment 147530 [details] [review] Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate When a record has multiple ISBNs the database stores them seperated by a pipe Zebra interprets a string like "isbn:1600213510 | 9781600213519" as an 'OR' search, but for Elasticsearch we need to explicitly send "OR" - and Zebra support this as well To test: 1 - Make sure you are using Elasticsearch 2 - Cataloging->Add a new record from Z3950 3 - Choose target: LOC 4 - Search for: Control number: 14455023 5 - Import and save 6 - Search for the record again 7 - Import and save - duplicate check isn't been triggered 8 - Apply patch 9 - restart_all 10 - repeat 2-7 11 - this time you should get a duplicate notification 12 - Sitch SearchEngine syspref to 'Zebra' 13 - repeat 2-7 14 - Ensure you still get duplicate notification Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Tested with LoC Control No. 1.) 16509983 (100 countries, 5000 ideas), ISBN: 9781426207587 (softcover : alk. paper) :; 1426207581 (softcover : alk. paper) and 2.) 19483458 (Cyberdoc), ISBN: 9780985248314 (cloth); 9780985248321 (pbk.) Thanks for the patch! The solution can be so easy, once you see it :) Thank you, Nick! Created attachment 147752 [details] [review] Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate When a record has multiple ISBNs the database stores them seperated by a pipe Zebra interprets a string like "isbn:1600213510 | 9781600213519" as an 'OR' search, but for Elasticsearch we need to explicitly send "OR" - and Zebra support this as well To test: 1 - Make sure you are using Elasticsearch 2 - Cataloging->Add a new record from Z3950 3 - Choose target: LOC 4 - Search for: Control number: 14455023 5 - Import and save 6 - Search for the record again 7 - Import and save - duplicate check isn't been triggered 8 - Apply patch 9 - restart_all 10 - repeat 2-7 11 - this time you should get a duplicate notification 12 - Sitch SearchEngine syspref to 'Zebra' 13 - repeat 2-7 14 - Ensure you still get duplicate notification Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.05. Nice work everyone, thanks! Nice work, thanks everyone! Pushed to 22.11.x for the next release. Backported to 22.05.x for upcoming 22.05.11 applied to 21.11 for 21.11.19 Not backported to 21.05.x |