Bug 31213: Auto search simple term quoted
authorNick Clemens <nick@bywatersolutions.com>
Thu, 21 Jul 2022 18:16:22 +0000 (18:16 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 2 Sep 2022 15:00:39 +0000 (15:00 +0000)
commite1500c7c6b054ccd4cb7575641809e696418cdce
treeae693be68f4a1b1ad6e1d1dbc84479ad7861f3ed
parent73f7c89ba69a32482fe7b3cb02e98b21ef443a45
Bug 31213: Auto search simple term quoted

This patch does a second search if the first had no results and was a simple single term search

We simply quote the term, rebuild the query, and rerun the search

This targets both Zebra and ES, but is more relevant for ES

To test:
0 - Have Koha running using ES
1 - Add titles your system "Ivy + Bean" "The 6:20 Man"
2 - Search for these titles without quotes - NO results under ES
3 - Search with quotes - you find them
4 - Apply patch, restart all
5 - Search again without quotes
6 - Success!
7 - Confirm search still works under Zebra

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ce5f0532c8fea625c838725f70518421ebbb22b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
catalogue/search.pl
opac/opac-search.pl