Bug 25882: Remove phr indicator from limits when processing
authorNick Clemens <nick@bywatersolutions.com>
Fri, 26 Jun 2020 13:19:47 +0000 (13:19 +0000)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Mon, 17 Aug 2020 09:30:44 +0000 (21:30 +1200)
commit0c736919a7603ecdce511cb9d3f33a02f2c1a7f5
tree6413f8942e87d9957111628f6fac05b6a2cd8c3e
parent2cd1258b2818ac70a70b7b23750240cd0ed85515
Bug 25882: Remove phr indicator from limits when processing

We assume all limits from advanced search to be a phrase and quote them
when doing this we should remove the phrase marker to avoid doulbe quoting

To test:
 1 - Have koha using ES
 2 - Go to advanced search
 3 - Limit by a single itemtype that exists
 4 - Get some results
 5 - Limit by a different itemtype that exists
 6 - Get some results
 7 - Limit by both itemtypes
 8 - Get only the results for the second itemtype
 9 - Enable DumpTemplateVarsIntranet and DumpSearchQueryTemplate
10 - Repeat search
11 - View page source and find 'search_query'
12 - See limit looks like itype:("("BK")" OR "("CR")")
13 - Apply patches
14 - Restart all the things
15 - Repeat search for both itemtypes
16 - Note results now include both types

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a2b2426de842ac86048cbf71e3760b6483fc0b3c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 455acf686d7e74aa5582bc700e856935e852573a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm