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")")
Created attachment 106338 [details] [review] Bug 25882: Unit test
Created attachment 106339 [details] [review] 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
Tested with es-5 and es-6, ok. Signing off
Created attachment 106342 [details] [review] 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>
Created attachment 106343 [details] [review] Bug 25882: Unit test Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 106344 [details] [review] 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>
*** Bug 26110 has been marked as a duplicate of this bug. ***
I had issues with the test plan, as using ES 6.8.8 (the default with KTD) I cannot even filter by one itemtype on the advanced search. Applying this patches , restarting and reloading the 'no results' page showed this actually fixes that also.
Created attachment 108067 [details] [review] Bug 25882: Unit test Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 108068 [details] [review] 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>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.03
backported to 19.11.x for 19.11.09
Missing dependencies for 19.05.x, can't backport.