@@ -, +, @@ --- Koha/SearchEngine/Elasticsearch/Indexer.pm | 18 +++++++++--------- misc/search_tools/rebuild_elasticsearch.pl | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) --- a/Koha/SearchEngine/Elasticsearch/Indexer.pm +++ a/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( --- a/misc/search_tools/rebuild_elasticsearch.pl +++ a/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 = (); --