Bugzilla – Attachment 167125 Details for
Bug 36947
Sort Elasticsearch facets according to system locale instead of using Perl's stringwise/bytewise sort
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36947 - Diacritics and lower case letters not taken into account when facets are alphabetized
Bug-36947---Diacritics-and-lower-case-letters-not-.patch (text/plain), 1.25 KB, created by
Lari Strand
on 2024-05-23 18:01:12 UTC
(
hide
)
Description:
Bug 36947 - Diacritics and lower case letters not taken into account when facets are alphabetized
Filename:
MIME Type:
Creator:
Lari Strand
Created:
2024-05-23 18:01:12 UTC
Size:
1.25 KB
patch
obsolete
>From 79c2f0ac1a15e4f2da4cd40eb2881ab75c6fc30f Mon Sep 17 00:00:00 2001 >From: lmstrand <lmstrand@gmail.com> >Date: Thu, 23 May 2024 16:46:10 +0300 >Subject: [PATCH] Bug 36947 - Diacritics and lower case letters not taken into > account when facets are alphabetized > >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index 54e6e644dc..3c0d828d4f 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -53,6 +53,7 @@ use MARC::Record; > use MARC::File::XML; > use MIME::Base64 qw( decode_base64 ); > use JSON; >+use Unicode::Normalize; > > Koha::SearchEngine::Elasticsearch::Search->mk_accessors(qw( store )); > >@@ -503,7 +504,7 @@ sub _convert_facets { > } > if( C4::Context->preference('FacetOrder') eq 'Alphabetical' ){ > @{ $facet->{facets} } = >- sort { $a->{facet_label_value} cmp $b->{facet_label_value} } @{ $facet->{facets} }; >+ sort { NFKD(uc($a->{facet_label_value})) cmp NFKD(uc($b->{facet_label_value})) } @{ $facet->{facets} }; > } > push @facets, $facet if exists $facet->{facets}; > } >-- >2.34.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 36947
:
167110
|
167125
|
167141
|
167142
|
167143
|
167145
|
167146
|
167188
|
167198
|
167880
|
168488
|
170489