]> git.koha-community.org Git - koha.git/commit
Bug 33353: Add compatibility with Search::Elasticsearch 8.0
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 28 Mar 2023 15:02:19 +0000 (17:02 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 1 Nov 2023 20:23:04 +0000 (17:23 -0300)
commit8194419144d05dc64617d8569810be2ff7bbda04
tree70da8c9327720e1e2c674caff8653c7d91f7b533
parent24aab6b9c52cb9846653d34d5630caf837e0508a
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>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/SearchEngine/Elasticsearch/Search.pm