]> git.koha-community.org Git - koha.git/commit
Bug 33353: Add compatibility with Elasticsearch 8.x
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 28 Mar 2023 14:41:08 +0000 (16:41 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 1 Nov 2023 20:23:04 +0000 (17:23 -0300)
commit24aab6b9c52cb9846653d34d5630caf837e0508a
tree2470740d19d9b3f23c890384f28d8172d8ff5af7
parent3f1e21bbca753168e194f0d4f23f9c84ebadeeaf
Bug 33353: Add compatibility with Elasticsearch 8.x

Elasticsearch 8 removed the support of types. This patch adapts the
requests accordingly.
With this patch, Koha will still be compatible with Elasticsearch 7.x
but will no longer work with Elasticsearch 6.x
Since Elasticsearch 6.x is no longer maintained, this should not be a
problem.

https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html

Tested with Search::Elasticsearch 6.80 and 7.717

Test plan:
1. Install Elasticsearch 8
   (use docker image: docker.io/koha/elasticsearch-icu:8.x)
2. Change the elasticsearch server location in $KOHA_CONF
3. Run misc/search_tools/rebuild_elasticsearch.pl -r -b -v
   It should fail
4. Apply the patch
5. Run misc/search_tools/rebuild_elasticsearch.pl -r -b -v
   It should end with "Total XXX records indexed"
6. Try to search some biblios and verify that it works the same as
   before

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/Indexer.pm