Bugzilla – Attachment 61982 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.91 KB, created by
Nick Clemens (kidclamp)
on 2017-04-08 03:16:49 UTC
(
hide
)
Description:
Bug 18318 - Unicode support for Elasticsearch
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-08 03:16:49 UTC
Size:
1.91 KB
patch
obsolete
>From 4ba66ca570233868ba1135b31bc5053e9ab211aa 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 >--- > 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 1fd8bc1..6908d74 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.1.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 18318
:
61982
|
67344
|
67449