|
Lines 33-39
use Modern::Perl;
Link Here
|
| 33 |
|
33 |
|
| 34 |
use Array::Utils qw( array_minus ); |
34 |
use Array::Utils qw( array_minus ); |
| 35 |
use Getopt::Long qw( GetOptions ); |
35 |
use Getopt::Long qw( GetOptions ); |
| 36 |
use Try::Tiny qw( catch try ); |
|
|
| 37 |
|
36 |
|
| 38 |
use C4::Context; |
37 |
use C4::Context; |
| 39 |
|
38 |
|
|
Lines 160-174
foreach my $index ( ( 'biblios', 'authorities' ) ) {
Link Here
|
| 160 |
if (@koha_problems) { |
159 |
if (@koha_problems) { |
| 161 |
|
160 |
|
| 162 |
print "=================\n"; |
161 |
print "=================\n"; |
| 163 |
print "Fixing missing records in the index ($index):\n\n"; |
162 |
print "Scheduling indexing of missing records ($index):\n\n"; |
| 164 |
|
163 |
|
| 165 |
foreach my $id (@koha_problems) { |
164 |
# index_records() takes care of splitting into chunks. |
| 166 |
try { |
165 |
$indexer->index_records( \@koha_problems, 'specialUpdate', $server ); |
| 167 |
$indexer->update_index( [$id] ); |
|
|
| 168 |
} catch { |
| 169 |
print STDERR "ERROR: record #$id failed: $_\n\n"; |
| 170 |
}; |
| 171 |
} |
| 172 |
} |
166 |
} |
| 173 |
|
167 |
|
| 174 |
if (@es_problems) { |
168 |
if (@es_problems) { |
| 175 |
- |
|
|