Lines 48-53
my $run_as_root;
Link Here
|
48 |
my $run_user = (getpwuid($<))[0]; |
48 |
my $run_user = (getpwuid($<))[0]; |
49 |
my $wait_for_lock = 0; |
49 |
my $wait_for_lock = 0; |
50 |
my $use_flock; |
50 |
my $use_flock; |
|
|
51 |
my $table = 'biblioitems'; |
51 |
|
52 |
|
52 |
my $verbose_logging = 0; |
53 |
my $verbose_logging = 0; |
53 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
54 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
Lines 75-80
my $result = GetOptions(
Link Here
|
75 |
'v+' => \$verbose_logging, |
76 |
'v+' => \$verbose_logging, |
76 |
'run-as-root' => \$run_as_root, |
77 |
'run-as-root' => \$run_as_root, |
77 |
'wait-for-lock' => \$wait_for_lock, |
78 |
'wait-for-lock' => \$wait_for_lock, |
|
|
79 |
't|table:s' => \$table, |
78 |
); |
80 |
); |
79 |
|
81 |
|
80 |
if (not $result or $want_help) { |
82 |
if (not $result or $want_help) { |
Lines 442-448
sub select_all_authorities {
Link Here
|
442 |
} |
444 |
} |
443 |
|
445 |
|
444 |
sub select_all_biblios { |
446 |
sub select_all_biblios { |
445 |
my $strsth = qq{ SELECT biblionumber FROM biblioitems }; |
447 |
$table = 'biblioitems' |
|
|
448 |
if $table ne 'items' |
449 |
and $table ne 'biblio'; |
450 |
my $strsth = qq{ SELECT biblionumber FROM $table }; |
446 |
$strsth.=qq{ WHERE $where } if ($where); |
451 |
$strsth.=qq{ WHERE $where } if ($where); |
447 |
$strsth.=qq{ LIMIT $length } if ($length && !$offset); |
452 |
$strsth.=qq{ LIMIT $length } if ($length && !$offset); |
448 |
$strsth.=qq{ LIMIT $offset,$length } if ($offset); |
453 |
$strsth.=qq{ LIMIT $offset,$length } if ($offset); |
Lines 918-923
Parameters:
Link Here
|
918 |
to wait for the lock to free and then continue |
923 |
to wait for the lock to free and then continue |
919 |
processing the rebuild request, |
924 |
processing the rebuild request, |
920 |
|
925 |
|
|
|
926 |
--table specify a table (can be items, biblioitems or biblio) to retrieve biblionumber to index. |
927 |
biblioitems is the default value. |
928 |
|
921 |
--help or -h show this message. |
929 |
--help or -h show this message. |
922 |
_USAGE_ |
930 |
_USAGE_ |
923 |
} |
931 |
} |
924 |
- |
|
|