]> git.koha-community.org Git - koha.git/commit
Bug 27307: Don't drop phrase directive when searching keyword index
authorNick Clemens <nick@bywatersolutions.com>
Thu, 24 Dec 2020 14:04:55 +0000 (14:04 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Fri, 29 Jan 2021 14:31:58 +0000 (14:31 +0000)
commitf587c6eb96f575a4634986b24da36fbf78588d32
tree2fab4354b09a65cacccb2a49d40e35081736a8d7
parent6640b92ac9122c2c4b43288f8080e0a5dcddeef1
Bug 27307: Don't drop phrase directive when searching keyword index

We convert 'keyword' to '' as an index since we want it to search all fields

When we are searching 'as phrase', however, we should not drop the search type

To test:
 1 - Enable IntranetCatalogPullDown
 2 - Set searchEngine to Elasticsearch
 3 - Perform a search for 'Keyword as phrase' for a phrase that does appear in a record
 4 - You get the result
 5 - Reverse the order of words in the phrase
 6 - You still get a result?
 7 - Apply patch
 8 - Restart all the things
 9 - Reversed search does not return record
10 - Correct order and search, correct record returned

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 9cfce5f010c485ee5e046bcc99a9d33a70d9213a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d9b2c504639e3e336a0ef8a1f75c31452a556e90)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm