X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_updatedb;h=a0d00690e6c3c7e9ded45a3527a0ad455d0b80ec;hp=69725af192c0111aab198331565b042bc949d352;hb=18add9ff73c8924a7c5acdcf57be9b4024da53c1;hpb=2b2ab40d38c95450034bc373a9acee8775bd53fa diff --git a/bin/BackupPC_updatedb b/bin/BackupPC_updatedb index 69725af..a0d0069 100755 --- a/bin/BackupPC_updatedb +++ b/bin/BackupPC_updatedb @@ -11,12 +11,10 @@ use Getopt::Std; use Time::HiRes qw/time/; use File::Pid; use POSIX qw/strftime/; -use BackupPC::SearchLib; +use BackupPC::Search; use Cwd qw/abs_path/; use Data::Dump qw(dump); -use BackupPC::Search::Estraier; - use constant BPC_FTYPE_DIR => 5; use constant EST_CHUNK => 4096; @@ -121,7 +119,7 @@ sub hest_update { my $offset = 0; my $added = 0; - my $search = BackupPC::Search::Estraier->new( $index_node_url ); + my $search = BackupPC::Search->search_module; my $results = 0; @@ -192,6 +190,8 @@ sub hest_update { } while ($results == EST_CHUNK); + $search->commit; + my $dur = (time() - $t) || 1; printf(" [%.2f/s dur: %s]\n", ( $added / $dur ),