Bugzilla – Attachment 67344 Details for
Bug 18318
Wrong unicode tokenization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18318: Unicode support for Elasticsearch
Bug-18318-Unicode-support-for-Elasticsearch.patch (text/plain), 1.97 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-09-25 13:10:17 UTC
(
hide
)
Description:
Bug 18318: Unicode support for Elasticsearch
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-09-25 13:10:17 UTC
Size:
1.97 KB
patch
obsolete
>From 2519816fd20c2d795185d1e9772f41ae4b6b61d6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Apr 2017 23:09:05 -0400 >Subject: [PATCH] Bug 18318: Unicode support for Elasticsearch > >You must install the icu plugin for elasticsearch >https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-icu.html > >Once installed, apply this patch >Reindex your data, deleting the existing indexes >perl /home/vagrant/kohaclone/misc/search_tools/rebuild_elastic_search.pl >-d >Find (or add) some titles with accented characters >Verify that a search for the exact character or the unaccented version >works > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/SearchEngine/Elasticsearch.pm | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index 43bb0a83a8..de4b18ce4d 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -141,12 +141,12 @@ sub get_elasticsearch_settings { > analysis => { > analyzer => { > analyser_phrase => { >- tokenizer => 'keyword', >- filter => ['lowercase'], >+ tokenizer => 'icu_tokenizer', >+ filter => ['icu_folding'], > }, > analyser_standard => { >- tokenizer => 'standard', >- filter => ['lowercase'], >+ tokenizer => 'icu_tokenizer', >+ filter => ['icu_folding'], > }, > }, > } >@@ -170,6 +170,7 @@ sub get_elasticsearch_mappings { > # TODO cache in the object? > my $mappings = { > data => { >+ _all => {type => "string", analyzer => "analyser_standard"}, > properties => { > record => { > store => "true", >-- >2.14.1
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 18318
:
61982
|
67344
|
67449