-
- my $uri = $row->{hname} . ':' . $row->{sname} . '#' . $row->{backupnum} . ' ' . $row->{filepath};
- if (! $skip_check && $hest_node) {
- my $id = $hest_node->uri_to_id($uri);
- next if ($id && $id == -1);
- }
-
- # create a document object
- my $doc = Search::Estraier::Document->new;
-
- # add attributes to the document object
- $doc->add_attr('@uri', $uri);
-
- foreach my $c (@{ $sth->{NAME} }) {
- print STDERR "attr $c = $row->{$c}\n" if ($debug > 2);
- $doc->add_attr($c, $row->{$c}) if (defined($row->{$c}));
- }
-
- #$doc->add_attr('@cdate', fmt_date($row->{'date'}));
-
- # add the body text to the document object
- my $path = $row->{'filepath'};
- $doc->add_text($path);
- $path =~ s/(.)/$1 /g;
- $doc->add_hidden_text($path);
-
- print STDERR $doc->dump_draft,"\n" if ($debug > 1);
-
- # register the document object to the database
- $hest_node->put_doc($doc) if ($hest_node);
-