|
@ -25,6 +25,7 @@ my $reset; |
|
|
my $biblios; |
|
|
my $biblios; |
|
|
my $authorities; |
|
|
my $authorities; |
|
|
my $noxml; |
|
|
my $noxml; |
|
|
|
|
|
my $noshadow; |
|
|
my $do_munge; |
|
|
my $do_munge; |
|
|
my $want_help; |
|
|
my $want_help; |
|
|
my $result = GetOptions( |
|
|
my $result = GetOptions( |
|
@ -34,6 +35,7 @@ my $result = GetOptions( |
|
|
'k' => \$keep_export, |
|
|
'k' => \$keep_export, |
|
|
'b' => \$biblios, |
|
|
'b' => \$biblios, |
|
|
'noxml' => \$noxml, |
|
|
'noxml' => \$noxml, |
|
|
|
|
|
'w' => \$noshadow, |
|
|
'munge-config' => \$do_munge, |
|
|
'munge-config' => \$do_munge, |
|
|
'a' => \$authorities, |
|
|
'a' => \$authorities, |
|
|
'h|help' => \$want_help, |
|
|
'h|help' => \$want_help, |
|
@ -51,6 +53,9 @@ if (not $biblios and not $authorities) { |
|
|
die $msg; |
|
|
die $msg; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($noshadow) { |
|
|
|
|
|
$noshadow = ' -n '; |
|
|
|
|
|
} |
|
|
my $use_tempdir = 0; |
|
|
my $use_tempdir = 0; |
|
|
unless ($directory) { |
|
|
unless ($directory) { |
|
|
$use_tempdir = 1; |
|
|
$use_tempdir = 1; |
|
@ -139,8 +144,8 @@ if ($authorities) { |
|
|
print "REINDEXING zebra\n"; |
|
|
print "REINDEXING zebra\n"; |
|
|
print "====================\n"; |
|
|
print "====================\n"; |
|
|
system("zebraidx -c ".C4::Context->zebraconfig('authorityserver')->{config}." -g iso2709 -d authorities init") if ($reset); |
|
|
system("zebraidx -c ".C4::Context->zebraconfig('authorityserver')->{config}." -g iso2709 -d authorities init") if ($reset); |
|
|
system("zebraidx -c ".C4::Context->zebraconfig('authorityserver')->{config}." -g iso2709 -d authorities update $directory/authorities"); |
|
|
system("zebraidx -c ".C4::Context->zebraconfig('authorityserver')->{config}." $noshadow -g iso2709 -d authorities update $directory/authorities"); |
|
|
system("zebraidx -c ".C4::Context->zebraconfig('authorityserver')->{config}." -g iso2709 -d authorities commit"); |
|
|
system("zebraidx -c ".C4::Context->zebraconfig('authorityserver')->{config}." -g iso2709 -d authorities commit") unless $noshadow; |
|
|
} else { |
|
|
} else { |
|
|
print "skipping authorities\n"; |
|
|
print "skipping authorities\n"; |
|
|
} |
|
|
} |
|
@ -373,8 +378,8 @@ if ($biblios) { |
|
|
print "REINDEXING zebra\n"; |
|
|
print "REINDEXING zebra\n"; |
|
|
print "====================\n"; |
|
|
print "====================\n"; |
|
|
system("zebraidx -g iso2709 -c ".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios init") if ($reset); |
|
|
system("zebraidx -g iso2709 -c ".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios init") if ($reset); |
|
|
system("zebraidx -g iso2709 -c ".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios update $directory/biblios"); |
|
|
system("zebraidx -g iso2709 -c ".C4::Context->zebraconfig('biblioserver')->{config}." $noshadow -d biblios update $directory/biblios"); |
|
|
system("zebraidx -g iso2709 -c ".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios commit"); |
|
|
system("zebraidx -g iso2709 -c ".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios commit") unless $noshadow; |
|
|
} else { |
|
|
} else { |
|
|
print "skipping biblios\n"; |
|
|
print "skipping biblios\n"; |
|
|
} |
|
|
} |
|
@ -414,7 +419,9 @@ mode, this job should not be used. |
|
|
|
|
|
|
|
|
Parameters: |
|
|
Parameters: |
|
|
-b index bibliographic records |
|
|
-b index bibliographic records |
|
|
|
|
|
|
|
|
-a index authority records |
|
|
-a index authority records |
|
|
|
|
|
|
|
|
-r clear Zebra index before |
|
|
-r clear Zebra index before |
|
|
adding records to index |
|
|
adding records to index |
|
|
|
|
|
|
|
@ -423,7 +430,9 @@ Parameters: |
|
|
created. The export directory |
|
|
created. The export directory |
|
|
is automatically deleted unless |
|
|
is automatically deleted unless |
|
|
you supply the -k switch. |
|
|
you supply the -k switch. |
|
|
|
|
|
|
|
|
-k Do not delete export directory. |
|
|
-k Do not delete export directory. |
|
|
|
|
|
|
|
|
-s Skip export. Used if you have |
|
|
-s Skip export. Used if you have |
|
|
already exported the records |
|
|
already exported the records |
|
|
in a previous run. |
|
|
in a previous run. |
|
@ -432,6 +441,9 @@ Parameters: |
|
|
instead of MARC XML. This |
|
|
instead of MARC XML. This |
|
|
option is recommended only |
|
|
option is recommended only |
|
|
for advanced user. |
|
|
for advanced user. |
|
|
|
|
|
|
|
|
|
|
|
-w skip shadow indexing for this batch |
|
|
|
|
|
|
|
|
-munge-config Deprecated option to try |
|
|
-munge-config Deprecated option to try |
|
|
to fix Zebra config files. |
|
|
to fix Zebra config files. |
|
|
--help or -h show this message. |
|
|
--help or -h show this message. |
|
|