View | Details | Raw Unified | Return to bug 26312
Collapse All | Expand All

(-)a/Koha/SearchEngine/Elasticsearch/Indexer.pm (-9 / +9 lines)
Lines 115-129 sub update_index { Link Here
115
    my $response;
115
    my $response;
116
    if (@body) {
116
    if (@body) {
117
        try{
117
        try{
118
        my $elasticsearch = $self->get_elasticsearch();
118
            my $elasticsearch = $self->get_elasticsearch();
119
        $response = $elasticsearch->bulk(
119
            $response = $elasticsearch->bulk(
120
            index => $self->index_name,
120
                index => $self->index_name,
121
            type => 'data', # is just hard coded in Indexer.pm?
121
                type => 'data', # is just hard coded in Indexer.pm?
122
            body => \@body
122
                body => \@body
123
        );
123
            );
124
        if ($response->{errors}) {
124
            if ($response->{errors}) {
125
            carp "One or more ElasticSearch errors occurred when indexing documents";
125
                carp "One or more ElasticSearch errors occurred when indexing documents";
126
        }
126
            }
127
        } catch {
127
        } catch {
128
            if( ref $_ eq 'Search::Elasticsearch::Error::Timeout' ){
128
            if( ref $_ eq 'Search::Elasticsearch::Error::Timeout' ){
129
            Koha::Exceptions::Elasticsearch::BadResponse->throw(
129
            Koha::Exceptions::Elasticsearch::BadResponse->throw(
(-)a/misc/search_tools/rebuild_elasticsearch.pl (-2 / +1 lines)
Lines 313-319 sub _do_reindex { Link Here
313
                    _log(1,$_->{error});
313
                    _log(1,$_->{error});
314
                    _log(2,$_->{details});
314
                    _log(2,$_->{details});
315
                }
315
                }
316
            }
316
            };
317
            $commit_count  = $commit;
317
            $commit_count  = $commit;
318
            @id_buffer     = ();
318
            @id_buffer     = ();
319
            @commit_buffer = ();
319
            @commit_buffer = ();
320
- 

Return to bug 26312