Bugzilla – Attachment 135543 Details for
Bug 25669
ElasticSearch 6: [types removal] Specifying types in put mapping requests is deprecated (incompatible with 7)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25669: [alternate] Use include_type_name parameter in ES calls (small fixes)
Bug-25669-alternate-Use-includetypename-parameter-.patch (text/plain), 6.91 KB, created by
Julian Maurice
on 2022-06-01 13:12:59 UTC
(
hide
)
Description:
Bug 25669: [alternate] Use include_type_name parameter in ES calls (small fixes)
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2022-06-01 13:12:59 UTC
Size:
6.91 KB
patch
obsolete
>From 7fa46c2bc43afe3fa49c33663eb4d39037ad3b21 Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Wed, 25 May 2022 09:19:21 +0000 >Subject: [PATCH] Bug 25669: [alternate] Use include_type_name parameter in ES > calls (small fixes) > >Bulk doesn't support include_type_name, update requirement to >Search::Elasticseach@6.80, and remove data type name from tests. > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 1 - > cpanfile | 2 +- > .../Koha/SearchEngine/Elasticsearch.t | 2 +- > .../SearchEngine/Elasticsearch/QueryBuilder.t | 86 +++++++++---------- > .../Koha/SearchEngine/Elasticsearch/Search.t | 38 ++++---- > 5 files changed, 62 insertions(+), 67 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index adefd1f7ec..0b5139e9a8 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -355,7 +355,6 @@ sub delete_index { > my $result = $elasticsearch->bulk( > index => $self->index_name, > type => 'data', >- include_type_name => JSON::true(), > body => \@body, > ); > if ($result->{errors}) { >diff --git a/cpanfile b/cpanfile >index a0a44f904e..be38c166b1 100644 >--- a/cpanfile >+++ b/cpanfile >@@ -94,7 +94,7 @@ requires 'Plack::Middleware::LogWarn', '0.001002'; > requires 'Plack::Middleware::ReverseProxy', '0.14'; > requires 'Readonly', '2.00'; > requires 'Schedule::At', '1.06'; >-requires 'Search::Elasticsearch', '6.00'; >+requires 'Search::Elasticsearch', '6.80'; > requires 'Sereal::Decoder', '3.0'; > requires 'Sereal::Encoder', '3.0'; > requires 'Storable', '2.20'; >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >index f29831f504..51c1430942 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >@@ -135,7 +135,7 @@ subtest 'get_elasticsearch_mappings() tests' => sub { > # test reading mappings > my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} ); > $mappings = $es->get_elasticsearch_mappings(); >- is( $mappings->{data}{properties}{isbn__sort}{index}, 'false', 'Field mappings parsed correctly' ); >+ is( $mappings->{properties}{isbn__sort}{index}, 'false', 'Field mappings parsed correctly' ); > }; > > subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub { >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index b4e2de938c..ca3978de17 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >@@ -39,50 +39,48 @@ $se->mock( 'get_elasticsearch_mappings', sub { > my %all_mappings; > > my $mappings = { >- data => { >- properties => { >- title => { >- type => 'text' >- }, >- title__sort => { >- type => 'text' >- }, >- subject => { >- type => 'text', >- facet => 1 >- }, >- 'subject-heading-thesaurus' => { >- type => 'text', >- facet => 1 >- }, >- itemnumber => { >- type => 'integer' >- }, >- sortablenumber => { >- type => 'integer' >- }, >- sortablenumber__sort => { >- type => 'integer' >- }, >- heading => { >- type => 'text' >- }, >- 'heading-main' => { >- type => 'text' >- }, >- heading__sort => { >- type => 'text' >- }, >- match => { >- type => 'text' >- }, >- 'match-heading' => { >- type => 'text' >- }, >- 'match-heading-see-from' => { >- type => 'text' >- }, >- } >+ properties => { >+ title => { >+ type => 'text' >+ }, >+ title__sort => { >+ type => 'text' >+ }, >+ subject => { >+ type => 'text', >+ facet => 1 >+ }, >+ 'subject-heading-thesaurus' => { >+ type => 'text', >+ facet => 1 >+ }, >+ itemnumber => { >+ type => 'integer' >+ }, >+ sortablenumber => { >+ type => 'integer' >+ }, >+ sortablenumber__sort => { >+ type => 'integer' >+ }, >+ heading => { >+ type => 'text' >+ }, >+ 'heading-main' => { >+ type => 'text' >+ }, >+ heading__sort => { >+ type => 'text' >+ }, >+ match => { >+ type => 'text' >+ }, >+ 'match-heading' => { >+ type => 'text' >+ }, >+ 'match-heading-see-from' => { >+ type => 'text' >+ }, > } > }; > $all_mappings{$self->index} = $mappings; >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >index e7d3b2ae62..59eabeb778 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >@@ -31,26 +31,24 @@ $se->mock( 'get_elasticsearch_mappings', sub { > my %all_mappings; > > my $mappings = { >- data => { >- properties => { >- title => { >- type => 'text' >- }, >- title__sort => { >- type => 'text' >- }, >- subject => { >- type => 'text' >- }, >- itemnumber => { >- type => 'integer' >- }, >- sortablenumber => { >- type => 'integer' >- }, >- sortablenumber__sort => { >- type => 'integer' >- } >+ properties => { >+ title => { >+ type => 'text' >+ }, >+ title__sort => { >+ type => 'text' >+ }, >+ subject => { >+ type => 'text' >+ }, >+ itemnumber => { >+ type => 'integer' >+ }, >+ sortablenumber => { >+ type => 'integer' >+ }, >+ sortablenumber__sort => { >+ type => 'integer' > } > } > }; >-- >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 25669
:
130288
|
130293
|
130341
|
130811
|
131009
|
131037
|
131484
|
132321
|
135335
|
135542
|
135543
|
136417
|
136418
|
136452
|
136453
|
139531
|
139532