Bugzilla – Attachment 130828 Details for
Bug 27770
ES: Deprecated aggregation order key [_term] used, replaced by [_key]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27770: ES: Deprecated aggregation order key [_term] used, replaced by [_key]
Bug-27770-ES-Deprecated-aggregation-order-key-term.patch (text/plain), 2.64 KB, created by
Victor Grousset/tuxayo
on 2022-02-18 12:33:49 UTC
(
hide
)
Description:
Bug 27770: ES: Deprecated aggregation order key [_term] used, replaced by [_key]
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2022-02-18 12:33:49 UTC
Size:
2.64 KB
patch
obsolete
>From 520eb773d9c8900d862cc64c022c01f0f97f6a2a Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Tue, 8 Feb 2022 14:35:18 +0100 >Subject: [PATCH] Bug 27770: ES: Deprecated aggregation order key [_term] used, > replaced by [_key] > >Starting in Elasticsearch 6.0 _key should be used instead of _term to order >buckets by their term > >To test: >1) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >2) If you observe an error about types, apply patch for bug 25669 >3) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >4) Observe if you get a deprecation warning about order key >5) Apply patch >6) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >7) Observe no deprecation warning about order key >8) Sign off > >Sponsored-by: Lund University Library >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- > t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 52cd31b7d9..6d25b69c5a 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -643,7 +643,7 @@ sub _build_scan_query { > $index => { > terms => { > field => $index . '__facet', >- order => { '_term' => 'asc' }, >+ order => { '_key' => 'asc' }, > include => $self->_create_regex_filter($self->clean_search_term($term)) . '.*' > } > } >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index b5e2ebdf5f..ca3978de17 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >@@ -505,7 +505,7 @@ subtest 'build_query tests' => sub { > $query->{aggregations}{'author'}{'terms'}, > { > field => 'author__facet', >- order => { '_term' => 'asc' }, >+ order => { '_key' => 'asc' }, > include => '[nN][eE][wW].*' > }, > "scan aggregation request is properly formed" >@@ -523,7 +523,7 @@ subtest 'build_query tests' => sub { > $query->{aggregations}{'subject'}{'terms'}, > { > field => 'subject__facet', >- order => { '_term' => 'asc' }, >+ order => { '_key' => 'asc' }, > include => '[nN][eE][wW].*' > }, > "scan aggregation request is properly formed" >-- >2.35.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 27770
:
130290
|
130342
|
130543
| 130828