move KinoSearch index path to KinoPath config var
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 9 Jan 2011 15:26:55 +0000 (15:26 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 9 Jan 2011 15:26:55 +0000 (15:26 +0000)
lib/BackupPC/Search/KinoSearch.pm

index 98b7f2f..f6b3f91 100644 (file)
@@ -12,7 +12,8 @@ use Data::Dump qw(dump);
 # my $tokenizer = KinoSearch::Analysis::Tokenizer->new( pattern => '\\w' );
 
 sub new {
 # my $tokenizer = KinoSearch::Analysis::Tokenizer->new( pattern => '\\w' );
 
 sub new {
-       my ( $class ) = @_;
+       my $class = shift @_;
+       my %Conf = @_;
 
        my $schema = KinoSearch::Plan::Schema->new;
 
 
        my $schema = KinoSearch::Plan::Schema->new;
 
@@ -46,7 +47,7 @@ sub new {
 
 #      $schema->spec_field( name => '_doc', type => $blob_type );
 
 
 #      $schema->spec_field( name => '_doc', type => $blob_type );
 
-       my $index_path = '/tmp/kinosearch'; # FIXME
+       my $index_path = $Conf{KinoPath} || die "no KinoPath";
 
        my $indexer = KinoSearch::Index::Indexer->new(
                schema => $schema,
 
        my $indexer = KinoSearch::Index::Indexer->new(
                schema => $schema,