Bug 27928: FindDuplicate should use simple_search_compat
authorNick Clemens <nick@bywatersolutions.com>
Thu, 11 Mar 2021 13:33:43 +0000 (13:33 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sat, 24 Apr 2021 13:54:40 +0000 (13:54 +0000)
commit2423e702cb7dcb83dac3aad6387690c70abd5c5e
treed1ed4527ec1a19a60a2290192a5a9e87b243d7c0
parent6eea3cd5b113993da819d76fb0de6a8a52e68a0f
Bug 27928: FindDuplicate should 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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 93a297a7a2de41df699d59107e43862518048d6e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a5566ca2169fd14638da139de604d712b48a9fa)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Search.pm
t/db_dependent/Search.t