Bugzilla – Attachment 106492 Details for
Bug 25864
Case sensitivity breaks searching of some fields in ES5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25864 - Lower case fields for searching
Bug-25864---Lower-case-fields-for-searching.patch (text/plain), 1.48 KB, created by
Alex Arnaud
on 2020-07-03 09:22:48 UTC
(
hide
)
Description:
Bug 25864 - Lower case fields for searching
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2020-07-03 09:22:48 UTC
Size:
1.48 KB
patch
obsolete
>From ce33b0ac5a1876538970bfc92a408205d11b7b33 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 24 Jun 2020 12:20:03 +0000 >Subject: [PATCH] Bug 25864 - Lower case fields for searching > >To recreate: > 1 - Have Koha using ES5 and Elasticsearch as search engine > 2 - Enable DumpTemplateVarsIntranet and DumpSearchQueryTemplate > 3 - Do a search in authorities using 'Search entire record' (abduction if using sample db) > 4 - Note no results > 5 - View the page source and find 'search_query' > 6 - Note the uppercased fields > 7 - curl 'es:9200/koha_kohadev_authorities/data/417?pretty' > 8 - Note all fields lower-cased > 9 - Apply patch >10 - Repeat search >11 - It works! > >Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> >Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 871f81d027..3c6aaa42b1 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -1170,7 +1170,7 @@ sub _search_fields { > my @search_fields; > while (my $search_field = $result->next) { > push @search_fields, [ >- $search_field->name, >+ lc $search_field->name, > $search_field->weight ? $search_field->weight : () > ]; > } >-- >2.11.0
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 25864
:
106246
|
106247
|
106345
|
106491
| 106492