Bugzilla – Attachment 148938 Details for
Bug 33353
Add compatibility with Elasticsearch 8 and OpenSearch 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33353: Add compatibility with Search::Elasticsearch 8.0
Bug-33353-Add-compatibility-with-SearchElasticsear.patch (text/plain), 1.68 KB, created by
Victor Grousset/tuxayo
on 2023-03-29 15:43:05 UTC
(
hide
)
Description:
Bug 33353: Add compatibility with Search::Elasticsearch 8.0
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2023-03-29 15:43:05 UTC
Size:
1.68 KB
patch
obsolete
>From 10d568d27a5d923acf328d2802165f730d7862a2 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 28 Mar 2023 17:02:19 +0200 >Subject: [PATCH] Bug 33353: Add compatibility with Search::Elasticsearch 8.0 > >For some reasons, with Search::Elasticsearch 8.0 JSON::true is >interpreted as 1 and Elasticsearch will always respond that it found "at >least 1 record". Something like this: > >{ > total => { > value => 1, > relation => 'gte' > } >} > >Replacing JSON::true by \1 works with every version of >Search::Elasticsearch I tested (6.80, 7.717, 8.0) > >Also worth noting: >Search::Elasticsearch will stop being supported by Elastic >https://github.com/elastic/elasticsearch-perl/issues/220 > >We might need to find an alternative for future versions of >Elasticsearch > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index e8e4412b56..933b52f79d 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -94,7 +94,7 @@ sub search { > my $results = eval { > $elasticsearch->search( > index => $self->index_name, >- track_total_hits => JSON::true, >+ track_total_hits => \1, > body => $query > ); > }; >@@ -124,7 +124,7 @@ sub count { > # and just return number of hits > my $result = $elasticsearch->search( > index => $self->index_name, >- track_total_hits => JSON::true, >+ track_total_hits => \1, > body => $query > ); > >-- >2.40.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 33353
:
148849
|
148850
|
148937
|
148938
|
148988
|
148989