--- trunk/run.pl 2006/05/15 17:23:38 509 +++ trunk/run.pl 2006/05/15 17:38:22 510 @@ -42,10 +42,13 @@ remove database and Hyper Estraier index before indexing -=item --only=database_name +=item --only=database_name/input_filter reindex just single database (legacy name is --one) +C is optional part which can be C +or C from input + =item --config conf/config.yml path to YAML configuration file @@ -70,7 +73,7 @@ my $clean = 0; my $config = 'conf/config.yml'; my $debug = 0; -my $only_db_name; +my $only_filter; my $force_set = 0; my $stats = 0; @@ -78,8 +81,8 @@ "limit=i" => \$limit, "offset=i" => \$offset, "clean" => \$clean, - "one=s" => \$only_db_name, - "only=s" => \$only_db_name, + "one=s" => \$only_filter, + "only=s" => \$only_filter, "config" => \$config, "debug" => \$debug, "force-set" => \$force_set, @@ -108,7 +111,8 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) { - next if ($only_db_name && $database !~ m/$only_db_name/i); + my ($only_database,$only_input) = split(m#/#, $only_filter); + next if ($only_database && $database !~ m/$only_database/i); my $indexer; @@ -178,6 +182,8 @@ foreach my $input (@inputs) { + next if ($only_input && $input->{name} =~ m#$only_input#i || $input->{type} =~ m#$only_input#i); + my $type = lc($input->{type}); die "I know only how to handle input types ", join(",", @supported_inputs), " not '$type'!\n" unless (grep(/$type/, @supported_inputs));