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

(-)a/Koha/SearchEngine/Elasticsearch/Indexer.pm (-3 / +6 lines)
Lines 300-314 sub index_records { Link Here
300
    $biblionumbers = [$biblionumbers] if ref $biblionumbers ne 'ARRAY' && defined $biblionumbers;
300
    $biblionumbers = [$biblionumbers] if ref $biblionumbers ne 'ARRAY' && defined $biblionumbers;
301
    $records = [$records] if ref $records ne 'ARRAY' && defined $records;
301
    $records = [$records] if ref $records ne 'ARRAY' && defined $records;
302
    if ( $op eq 'specialUpdate' ) {
302
    if ( $op eq 'specialUpdate' ) {
303
        my $index_biblionumbers;
303
        unless ($records) {
304
        unless ($records) {
304
            foreach my $biblionumber ( @$biblionumbers ){
305
            foreach my $biblionumber ( @$biblionumbers ){
305
                my $record = C4::Biblio::GetMarcBiblio({
306
                my $record = C4::Biblio::GetMarcBiblio({
306
                    biblionumber => $biblionumber,
307
                    biblionumber => $biblionumber,
307
                    embed_items  => 1 });
308
                    embed_items  => 1 });
308
                push @$records, $record;
309
                if( $record ){
310
                    push @$records, $record;
311
                    push @$index_biblionumbers, $biblionumber;
312
                }
309
            }
313
            }
310
        }
314
        }
311
        $self->update_index_background( $biblionumbers, $records );
315
        $self->update_index_background( $index_biblionumbers, $records );
312
    }
316
    }
313
    elsif ( $op eq 'recordDelete' ) {
317
    elsif ( $op eq 'recordDelete' ) {
314
        $self->delete_index_background( $biblionumbers );
318
        $self->delete_index_background( $biblionumbers );
315
- 

Return to bug 25265