Bug 33093: (Bug 27546 follow-up) With ES searching within results does not work for...
authorJanusz Kaczmarek <januszop@gmail.com>
Tue, 28 Feb 2023 18:18:05 +0000 (19:18 +0100)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Mon, 15 May 2023 09:59:20 +0000 (09:59 +0000)
commit692b91521fc49c85145e6004a201907492b4f4d0
treeb0ce62856a6983c1df1f4b51951eded742ec45da
parent746d70c6ef88f981d05ddb54f49ed769e35c12a5
Bug 33093: (Bug 27546 follow-up) With ES searching within results does not work for 'Keyword' and 'Keyword as phrase'

The feature of searching within search results in librarian
interface has some problems with with elastic: 'Keyword' and
'Keyword as phrase' searches give no results.  This is because
elastic is unaware of the search field 'kw' and 'kw' is not
transformed nor removed for limits.

Test plan
=========
1. Have a Koha instance with reasonable number of biblio records
1. Set SearchEngine to Elasticsearch
3. In librarian interface, perform a search that would give
   you a list of results
4. With the new search box 'Search within results', having 'Keyword'
   and 'Keyword as phrase' active, try to perform a search within
   search results with a term that should give you some results
5. You should get no results
6. Apply the patch
7. Repeat steps 3 and 4
8. You should get expected results.  Note the difference between
   'Keyword' and 'Keyword as phrase' in results
9. Sign off

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb5cc8d708faf7debcee35ce387329373e0bc40e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm