Lines 34-39
my $want_help;
Link Here
|
34 |
my $as_xml; |
34 |
my $as_xml; |
35 |
my $process_zebraqueue; |
35 |
my $process_zebraqueue; |
36 |
my $do_not_clear_zebraqueue; |
36 |
my $do_not_clear_zebraqueue; |
|
|
37 |
my $length; |
38 |
my $where; |
39 |
my $offset; |
37 |
my $verbose_logging = 0; |
40 |
my $verbose_logging = 0; |
38 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
41 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
39 |
my $result = GetOptions( |
42 |
my $result = GetOptions( |
Lines 51-57
my $result = GetOptions(
Link Here
|
51 |
'x' => \$as_xml, |
54 |
'x' => \$as_xml, |
52 |
'y' => \$do_not_clear_zebraqueue, |
55 |
'y' => \$do_not_clear_zebraqueue, |
53 |
'z' => \$process_zebraqueue, |
56 |
'z' => \$process_zebraqueue, |
54 |
'v+' => \$verbose_logging, |
57 |
'where:s' => \$where, |
|
|
58 |
'length:i' => \$length, |
59 |
'offset:i' => \$offset, |
60 |
'v+' => \$verbose_logging, |
55 |
); |
61 |
); |
56 |
|
62 |
|
57 |
|
63 |
|
Lines 294-306
sub select_all_records {
Link Here
|
294 |
} |
300 |
} |
295 |
|
301 |
|
296 |
sub select_all_authorities { |
302 |
sub select_all_authorities { |
297 |
my $sth = $dbh->prepare("SELECT authid FROM auth_header"); |
303 |
my $strsth=qq{SELECT authid FROM auth_header}; |
|
|
304 |
$strsth.=qq{ WHERE $where } if ($where); |
305 |
$strsth.=qq{ LIMIT $length } if ($length && !$offset); |
306 |
$strsth.=qq{ LIMIT $offset,$length } if ($length && $offset); |
307 |
my $sth = $dbh->prepare($strsth); |
298 |
$sth->execute(); |
308 |
$sth->execute(); |
299 |
return $sth; |
309 |
return $sth; |
300 |
} |
310 |
} |
301 |
|
311 |
|
302 |
sub select_all_biblios { |
312 |
sub select_all_biblios { |
303 |
my $sth = $dbh->prepare("SELECT biblionumber FROM biblioitems ORDER BY biblionumber"); |
313 |
my $strsth = qq{ SELECT biblionumber FROM biblioitems }; |
|
|
314 |
$strsth.=qq{ WHERE $where } if ($where); |
315 |
$strsth.=qq{ LIMIT $length } if ($length && !$offset); |
316 |
$strsth.=qq{ LIMIT $offset,$length } if ($offset); |
317 |
my $sth = $dbh->prepare($strsth); |
304 |
$sth->execute(); |
318 |
$sth->execute(); |
305 |
return $sth; |
319 |
return $sth; |
306 |
} |
320 |
} |
Lines 639-645
Parameters:
Link Here
|
639 |
warnings and errors from the indexing are shown. |
653 |
warnings and errors from the indexing are shown. |
640 |
Use log level 2 (-v -v) to include all Zebra logs. |
654 |
Use log level 2 (-v -v) to include all Zebra logs. |
641 |
|
655 |
|
642 |
-munge-config Deprecated option to try |
656 |
--length 1234 how many biblio you want to export |
|
|
657 |
--offset 1243 offset you want to start to |
658 |
example: --offset 500 --length=500 will result in a LIMIT 500,1000 (exporting 1000 records, starting by the 500th one) |
659 |
note that the numbers are NOT related to biblionumber, that's the intended behaviour. |
660 |
--where let you specify a WHERE query, like itemtype='BOOK' |
661 |
or something like that |
662 |
|
663 |
--munge-config Deprecated option to try |
643 |
to fix Zebra config files. |
664 |
to fix Zebra config files. |
644 |
--help or -h show this message. |
665 |
--help or -h show this message. |
645 |
_USAGE_ |
666 |
_USAGE_ |
646 |
- |
|
|