Bugzilla – Attachment 148988 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 Elasticsearch 8.x
Bug-33353-Add-compatibility-with-Elasticsearch-8x.patch (text/plain), 2.54 KB, created by
Philip Orr
on 2023-03-30 13:23:55 UTC
(
hide
)
Description:
Bug 33353: Add compatibility with Elasticsearch 8.x
Filename:
MIME Type:
Creator:
Philip Orr
Created:
2023-03-30 13:23:55 UTC
Size:
2.54 KB
patch
obsolete
>From dd2cb5ab52077501527bb4a7b4a377af161b734a Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 28 Mar 2023 16:41:08 +0200 >Subject: [PATCH] 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> >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index 6101a3a372..e711d32a61 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -134,7 +134,6 @@ sub update_index { > my $elasticsearch = $self->get_elasticsearch(); > $response = $elasticsearch->bulk( > index => $self->index_name, >- type => 'data', # is just hard coded in Indexer.pm? > body => \@body > ); > if ($response->{errors}) { >@@ -270,11 +269,7 @@ sub update_mappings { > try { > my $response = $elasticsearch->indices->put_mapping( > index => $self->index_name, >- type => 'data', >- include_type_name => JSON::true(), >- body => { >- data => $mappings >- } >+ body => $mappings, > ); > } catch { > $self->set_index_status_recreate_required(); >@@ -363,7 +358,6 @@ sub delete_index { > my @body = map { { delete => { _id => "$_" } } } @{$biblionums}; > my $result = $elasticsearch->bulk( > index => $self->index_name, >- type => 'data', > body => \@body, > ); > if ($result->{errors}) { >-- >2.30.2
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