8 |
|
|
9 |
use WebPAC::Common 0.02; |
use WebPAC::Common 0.02; |
10 |
use WebPAC::Parser 0.08; |
use WebPAC::Parser 0.08; |
11 |
use WebPAC::Input 0.14; |
use WebPAC::Input 0.16; |
12 |
use WebPAC::Store 0.14; |
use WebPAC::Store 0.14; |
13 |
use WebPAC::Normalize 0.22; |
use WebPAC::Normalize 0.22; |
14 |
use WebPAC::Output::TT; |
use WebPAC::Output::TT; |
153 |
|
|
154 |
|
|
155 |
my $use_indexer = $config->use_indexer; |
my $use_indexer = $config->use_indexer; |
156 |
|
$stats ||= $validate; |
157 |
if ($stats) { |
if ($stats) { |
158 |
$log->debug("option --stats disables update of indexing engine..."); |
$log->debug("disabled indexing for stats collection"); |
159 |
$use_indexer = undef; |
$use_indexer = undef; |
160 |
} else { |
} else { |
161 |
$log->info("using $use_indexer indexing engine..."); |
$log->info("using $use_indexer indexing engine..."); |
468 |
|
|
469 |
my $row = $input_db->fetch || next; |
my $row = $input_db->fetch || next; |
470 |
|
|
471 |
|
$total_rows++; |
472 |
|
|
473 |
my $mfn = $row->{'000'}->[0]; |
my $mfn = $row->{'000'}->[0]; |
474 |
|
|
475 |
if (! $mfn || $mfn !~ m#^\d+$#) { |
if (! $mfn || $mfn !~ m#^\d+$#) { |
480 |
|
|
481 |
|
|
482 |
if ($validate) { |
if ($validate) { |
483 |
if ( my $errors = $validate->validate_errors( $row, $input_db->dump ) ) { |
if ( my $errors = $validate->validate_rec( $row, $input_db->dump_ascii ) ) { |
484 |
$log->error( "MFN $mfn validation error:\n", |
$log->error( "MFN $mfn validation error:\n", |
485 |
$validate->report_error( $errors ) |
$validate->report_error( $errors ) |
486 |
); |
); |
487 |
} |
} |
488 |
|
next; # validation doesn't create any output |
489 |
} |
} |
490 |
|
|
491 |
my $ds = WebPAC::Normalize::data_structure( |
my $ds = WebPAC::Normalize::data_structure( |
534 |
|
|
535 |
$log->info("Created $i instances of MFN $mfn\n") if ($i > 1); |
$log->info("Created $i instances of MFN $mfn\n") if ($i > 1); |
536 |
} |
} |
|
|
|
|
$total_rows++; |
|
537 |
} |
} |
538 |
|
|
539 |
if ($validate) { |
if ($validate) { |