Summary: | FindDuplicate is hardcoded to use Zebra | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Searching | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, dcook, fridolin.somers, kyle, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24562 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.05,20.05.11
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 30153 | ||
Attachments: |
Bug 27928: FindDuplicate shuold use simple_search_compat
Bug 27928: FindDuplicate shuold use simple_search_compat Bug 27928: FindDuplicate shuold use simple_search_compat |
Description
Nick Clemens (kidclamp)
2021-03-11 13:34:32 UTC
Created attachment 118120 [details] [review] Bug 27928: FindDuplicate shuold use simple_search_compat This patch switches from calling SimpleSearch directly to using the compat method so that Elastic is used when it is the chosen search engine To test: 1 - Set SearchEngine syspref to 'Zebra' 2 - Add a suggestion with an existing title, e.g.: 'E street shuffle' 3 - Confirm you get a duplication warning 4 - Change SearchEngine to ES 5 - Repeat get same warning 6 - sudo koha-zebra --stop 'ps aux | grep zebra' to confirm they are stoped 'sudo pkill -9 zebra' if they arent; 7 - Repeat suggestion - no duplication warning (because zebra returns nothing) 8 - Delete the suggestion 9 - Apply patches 10 - Restart all the things, stop zebra 11 - Repeat suggestion 12 - Successful warning from ES 13 - prove -v t/db_dependent/Search.t Created attachment 118577 [details] [review] Bug 27928: FindDuplicate shuold use simple_search_compat This patch switches from calling SimpleSearch directly to using the compat method so that Elastic is used when it is the chosen search engine To test: 1 - Set SearchEngine syspref to 'Zebra' 2 - Add a suggestion with an existing title, e.g.: 'E street shuffle' 3 - Confirm you get a duplication warning 4 - Change SearchEngine to ES 5 - Repeat get same warning 6 - sudo koha-zebra --stop 'ps aux | grep zebra' to confirm they are stoped 'sudo pkill -9 zebra' if they arent; 7 - Repeat suggestion - no duplication warning (because zebra returns nothing) 8 - Delete the suggestion 9 - Apply patches 10 - Restart all the things, stop zebra 11 - Repeat suggestion 12 - Successful warning from ES 13 - prove -v t/db_dependent/Search.t Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Works perfect with both engines. Created attachment 118816 [details] [review] Bug 27928: FindDuplicate shuold use simple_search_compat This patch switches from calling SimpleSearch directly to using the compat method so that Elastic is used when it is the chosen search engine To test: 1 - Set SearchEngine syspref to 'Zebra' 2 - Add a suggestion with an existing title, e.g.: 'E street shuffle' 3 - Confirm you get a duplication warning 4 - Change SearchEngine to ES 5 - Repeat get same warning 6 - sudo koha-zebra --stop 'ps aux | grep zebra' to confirm they are stoped 'sudo pkill -9 zebra' if they arent; 7 - Repeat suggestion - no duplication warning (because zebra returns nothing) 8 - Delete the suggestion 9 - Apply patches 10 - Restart all the things, stop zebra 11 - Repeat suggestion 12 - Successful warning from ES 13 - prove -v t/db_dependent/Search.t Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Clear and simple fix, works as expected, no regressions found. Passing QA Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.05 Pushed to 20.05.x for 20.05.11 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. I think this may have inadvertently fixed Bug 24562. In theory, the max results could be 1 instead of 50, since all the code that uses FindDuplicate only ever takes the 1st result, but I suppose you never know... |