Lines 19-24
use C4::Biblio qw(
Link Here
|
19 |
ModBiblioMarc |
19 |
ModBiblioMarc |
20 |
GetFrameworkCode |
20 |
GetFrameworkCode |
21 |
GetMarcBiblio |
21 |
GetMarcBiblio |
|
|
22 |
BiblioAutoLink |
22 |
); |
23 |
); |
23 |
use C4::Koha; |
24 |
use C4::Koha; |
24 |
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag ); |
25 |
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag ); |
Lines 125-130
if ($all) {
Link Here
|
125 |
|
126 |
|
126 |
my $using_elastic_search = (C4::Context->preference('SearchEngine') eq 'Elasticsearch'); |
127 |
my $using_elastic_search = (C4::Context->preference('SearchEngine') eq 'Elasticsearch'); |
127 |
my $modify_biblio_marc_options = { |
128 |
my $modify_biblio_marc_options = { |
|
|
129 |
disable_autolink => $using_elastic_search, |
128 |
defer_search_engine_indexing => $using_elastic_search, |
130 |
defer_search_engine_indexing => $using_elastic_search, |
129 |
overlay_context => { source => 'bulkmarcimport' } |
131 |
overlay_context => { source => 'bulkmarcimport' } |
130 |
}; |
132 |
}; |
Lines 541-547
RECORD: foreach my $record (@{$marc_records}) {
Link Here
|
541 |
} |
543 |
} |
542 |
} |
544 |
} |
543 |
elsif ($insert) { |
545 |
elsif ($insert) { |
544 |
eval { ($record_id, $biblioitemnumber) = AddBiblio($record, $framework, { defer_marc_save => 1 }) }; |
546 |
eval { ($record_id, $biblioitemnumber) = AddBiblio($record, $framework, { disable_autolink => 1, defer_marc_save => 1 }) }; |
545 |
if ($@) { |
547 |
if ($@) { |
546 |
warn "ERROR: Insert biblio $originalid failed: $@\n"; |
548 |
warn "ERROR: Insert biblio $originalid failed: $@\n"; |
547 |
printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile); |
549 |
printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile); |
Lines 645-650
RECORD: foreach my $record (@{$marc_records}) {
Link Here
|
645 |
$schema->txn_begin; |
647 |
$schema->txn_begin; |
646 |
if ($indexer) { |
648 |
if ($indexer) { |
647 |
$indexer->update_index(\@search_engine_record_ids, \@search_engine_records); |
649 |
$indexer->update_index(\@search_engine_record_ids, \@search_engine_records); |
|
|
650 |
if (C4::Context->preference('BiblioAddsAuthorities')) { |
651 |
foreach my $record (@search_engine_records) { |
652 |
BiblioAutoLink($record, $framework); |
653 |
} |
654 |
} |
648 |
@search_engine_record_ids = (); |
655 |
@search_engine_record_ids = (); |
649 |
@search_engine_records = (); |
656 |
@search_engine_records = (); |
650 |
} |
657 |
} |
651 |
- |
|
|