Bugzilla – Attachment 119014 Details for
Bug 26312
Add some error handling during Elasticsearch indexing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26312: (follow-up) Fix whitespace and missing semicolon
Bug-26312-follow-up-Fix-whitespace-and-missing-sem.patch (text/plain), 2.16 KB, created by
Nick Clemens
on 2021-03-30 14:25:59 UTC
(
hide
)
Description:
Bug 26312: (follow-up) Fix whitespace and missing semicolon
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2021-03-30 14:25:59 UTC
Size:
2.16 KB
patch
obsolete
>From e9430e52dfe3b4a88c773523f89224aba9557071 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 30 Mar 2021 14:25:28 +0000 >Subject: [PATCH] Bug 26312: (follow-up) Fix whitespace and missing semicolon > >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 18 +++++++++--------- > misc/search_tools/rebuild_elasticsearch.pl | 2 +- > 2 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index c982b99da8..43c2c8d193 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -115,15 +115,15 @@ sub update_index { > my $response; > if (@body) { > try{ >- 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}) { >- carp "One or more ElasticSearch errors occurred when indexing documents"; >- } >+ 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}) { >+ carp "One or more ElasticSearch errors occurred when indexing documents"; >+ } > } catch { > if( ref $_ eq 'Search::Elasticsearch::Error::Timeout' ){ > Koha::Exceptions::Elasticsearch::BadResponse->throw( >diff --git a/misc/search_tools/rebuild_elasticsearch.pl b/misc/search_tools/rebuild_elasticsearch.pl >index 9206b4c11a..19839ff6da 100755 >--- a/misc/search_tools/rebuild_elasticsearch.pl >+++ b/misc/search_tools/rebuild_elasticsearch.pl >@@ -313,7 +313,7 @@ sub _do_reindex { > _log(1,$_->{error}); > _log(2,$_->{details}); > } >- } >+ }; > $commit_count = $commit; > @id_buffer = (); > @commit_buffer = (); >-- >2.11.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 26312
:
109241
|
109626
|
113501
|
114229
|
117618
|
117619
|
119014
|
119079
|
119612
|
119613
|
119614
|
119615
|
119699
|
119700