my $skip_check = $opt{j} && print STDERR "Skipping check for existing files -- this should be used only with initital import\n";
- unless (defined($index_node_url)) {
- print STDERR "HyperEstraier support not enabled in configuration\n";
+ unless ($index_node_url && $index_node_url =~ m#^http://#) {
+ print STDERR "HyperEstraier support not enabled or index node invalid\n" if ($debug);
$index_node_url = 0;
return;
}
while (my $row = $sth->fetchrow_hashref()) {
my $uri = $row->{hname} . ':' . $row->{sname} . '#' . $row->{backupnum} . ' ' . $row->{filepath};
- unless ($skip_check && $hest_node) {
+ if (! $skip_check && $hest_node) {
my $id = $hest_node->uri_to_id($uri);
next if ($id && $id == -1);
}
print STDERR $doc->dump_draft,"\n" if ($debug > 1);
# register the document object to the database
- if ($hest_node) {
- $hest_node->put_doc($doc);
- } else {
- die "not supported";
- }
+ $hest_node->put_doc($doc) if ($hest_node);
+
$added++;
}