]> git.koha-community.org Git - koha.git/commit
Bug 21534: Always compute wildcards
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 29 May 2019 13:20:41 +0000 (15:20 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 20 Jun 2019 12:44:05 +0000 (14:44 +0200)
commita8cc9d5f49f36a5bf69265f3062f1a7a8ee0fdf4
tree06bda7e049b9e337501bf1267fc4ed4ce36580c4
parent16858fd5d5b14680bce00a5c7c85c62c9584980e
Bug 21534: Always compute wildcards

You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) :
ie /cgi-bin/koha/opac-search.pl?q=saints-anges*

Looks like query-string by default does not compute wildcards, see analyze_wildcard in :
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

Test plan :
1) Use Elasticsearch
2) Create a record with "saints-anges"
3) Search for "saints-anges" => you get results
4) Search for "saints-anges*" => you get results
5) Search for "saints-ang*" => you get results

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 001d433b427731a6efd55208ac3169107c830730)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm