Summary: | FindDuplicate ElasticSearch should not use lowercase 'and' | ||
---|---|---|---|
Product: | Koha | Reporter: | Thomas Klausner <domm> |
Component: | Searching - Elasticsearch | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | minor | ||
Priority: | P5 - low | CC: | andrew, dcook, kyle, martin.renvoize, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25616 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.05.00,21.11.04,21.05.13
|
|
Circulation function: | |||
Bug Depends on: | 27928 | ||
Bug Blocks: | |||
Attachments: |
Use uppercase AND to join query parts
Bug 30153: Use uppercase AND to join query parts Bug 30153: (QA follow-up) Fix unit tests |
Description
Thomas Klausner
2022-02-22 14:08:32 UTC
See Also 27928 Created attachment 131014 [details] [review] Use uppercase AND to join query parts Fix Bug 30153 Created attachment 131016 [details] [review] Bug 30153: Use uppercase AND to join query parts C4::Search->FindDuplicate joins title and author using 'and' (lowercase). When this query is passed on to ElasticSearch, it interprets the lowercase 'and' as a term to search for, because the operator has to be in uppercases ('AND'). Test plan: * Reproduce the bug: - Set SearchEngine to ElasticSearch (and make sure you have the data indexed etc) - Find an existing book, note the title (245a) and the author (100a) - Create a new book (Cataloging -> New Record) - Fill in the same title and author using the same data as in an existing book (and any other fields that might be required) - Click "save" => A new book will be created, the Duplicate Finder has failed * Apply the patch * Check if it's working now: - Create a new book (Cataloging -> New Record) - Fill in the same title and author using the same data as in an existing book (and any other fields that might be required) - Click "save" - The DuplicateFinder should now report the already exising book Maybe we should also check if Zebra does not have any problems with the uppercase 'AND'? In that case, repeat the above steps, but set SearchEngine to Zebra :-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I tested against Zebra and found no obvious regressions, ES issue is resolved... Signing off. This a trivial patch, and given I've just QA'd bug 25616 now it's been brought to my attention, I'm going to go ahead and QA this one too. Unit test update inbound, then it'll be a pass. Created attachment 131023 [details] [review] Bug 30153: (QA follow-up) Fix unit tests Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.04 Pushed to 21.05.x for 21.05.13 Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. |