Bugzilla – Attachment 90260 Details for
Bug 21534
ElasticSearch - Wildcards not being analyzed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21534: Always compute wildcards
Bug-21534-Always-compute-wildcards.patch (text/plain), 1.49 KB, created by
Arthur Bousquet
on 2019-05-31 20:03:46 UTC
(
hide
)
Description:
Bug 21534: Always compute wildcards
Filename:
MIME Type:
Creator:
Arthur Bousquet
Created:
2019-05-31 20:03:46 UTC
Size:
1.49 KB
patch
obsolete
>From 74f48f59d62d73bc420015bd9e63f0c41a9a55af Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 29 May 2019 15:20:41 +0200 >Subject: [PATCH] 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> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 084d5ad..0cbca55 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -92,6 +92,7 @@ sub build_query { > default_operator => 'AND', > default_field => '_all', > lenient => JSON::true, >+ analyze_wildcard => JSON::true, > fields => $options{fields} || [], > } > }; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21534
:
90187
|
90207
|
90247
|
90260
|
90614