89 |
my $dur = (time() - $start_t) || 1; |
my $dur = (time() - $start_t) || 1; |
90 |
printf STDERR "%d documents in %.2fs [%.2f docs/s]\n", $docs, $dur, ($docs / $dur); |
printf STDERR "%d documents in %.2fs [%.2f docs/s]\n", $docs, $dur, ($docs / $dur); |
91 |
|
|
92 |
|
$db->master( |
93 |
|
action => 'sync' |
94 |
|
); |
95 |
|
|
96 |
|
|
97 |
exit; |
exit; |
98 |
|
|
99 |
sub dump_contents { |
sub dump_contents { |
141 |
# boost title |
# boost title |
142 |
$doc->add_hidden_text($title); |
$doc->add_hidden_text($title); |
143 |
|
|
144 |
print $doc->dump_draft if ($verbose); |
print $doc->dump_draft if ($debug); |
145 |
|
|
146 |
# register the document object to the database |
# register the document object to the database |
147 |
$db->put_doc($doc); |
$db->put_doc($doc); |
200 |
my $contents; |
my $contents; |
201 |
|
|
202 |
return if (! $force && -l $path || $path =~ m#/.svn# || $path =~ m/(~|.bak|.gif)$/); |
return if (! $force && -l $path || $path =~ m#/.svn# || $path =~ m/(~|.bak|.gif)$/); |
203 |
|
return if (! $all && -d $path); |
204 |
|
|
205 |
my $mtime = (stat($path))[9] || -1; |
my $mtime = (stat($path))[9] || -1; |
206 |
my $mtime_db = eval { $db->get_doc_attr_by_uri("file:///$path", '@mtime') }; |
my $mtime_db = eval { $db->get_doc_attr_by_uri("file:///$path", '@mtime') }; |