moved clean into WebPAC::Output::Estraier, cleanup
[webpac2] / run.pl
diff --git a/run.pl b/run.pl
index e5bcdad..4f99408 100755 (executable)
--- a/run.pl
+++ b/run.pl
@@ -13,7 +13,7 @@ use WebPAC::Input 0.03;
 use WebPAC::Store 0.03;
 use WebPAC::Normalize::XML;
 use WebPAC::Output::TT;
-use WebPAC::Output::Estraier 0.05;
+use WebPAC::Output::Estraier 0.08;
 use YAML qw/LoadFile/;
 use Getopt::Long;
 use File::Path;
@@ -81,16 +81,9 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
 
        my $est_config = $config->{hyperestraier} || $log->logdie("can't find 'hyperestraier' part in confguration");
        $est_config->{database} = $database;
+       $est_config->{clean} = $clean;
 
-       my $est = new WebPAC::Output::Estraier(
-               %{ $est_config },
-       );
-
-       if ($clean) {
-               $log->warn("creating new empty index $database");
-               $est->master( action => 'nodedel', name => $database );
-               $est->master( action => 'nodeadd', name => $database, label => $database );
-       }
+       my $est = new WebPAC::Output::Estraier( %{ $est_config } );
 
        #
        # now WebPAC::Store