Hi,
Is there a reason it isn't possible to create a new IndexReader on an
empty index? I get a Carp::confess() from
/usr/lib/perl5/vendor_perl/5.8.4/i686-linux/KinoSearch/Index/IndexReader.pm
line 106.
This is with KinoSearch-0.20_04. Here is a snippet of code I am using:
my $hostname = hostname();
die "Can't get unique hostname" unless $hostname;
my $invindex = GT::Maildir::KinoSearch::Schema->open($path);
my $lock_factory = KinoSearch::Store::LockFactory->new(
folder => $invindex->get_folder,
agent_id => $hostname,
);
my $reader = KinoSearch::Index::IndexReader->open(
invindex => $invindex,
lock_factory => $lock_factory,
);
return KinoSearch::Searcher->new(
invindex => $invindex,
reader => $reader
);
Am I doing something wrong?
Also, on a side note, the docs here:
http://www.rectangular.com/kinosearch/docs/devel/KinoSearch/Store/LockFactory.html
say to use KinoSearch::Index::IndexReader->new(), not ->open(), but
that gives an error.
Thanks,
Scott
Is there a reason it isn't possible to create a new IndexReader on an
empty index? I get a Carp::confess() from
/usr/lib/perl5/vendor_perl/5.8.4/i686-linux/KinoSearch/Index/IndexReader.pm
line 106.
This is with KinoSearch-0.20_04. Here is a snippet of code I am using:
my $hostname = hostname();
die "Can't get unique hostname" unless $hostname;
my $invindex = GT::Maildir::KinoSearch::Schema->open($path);
my $lock_factory = KinoSearch::Store::LockFactory->new(
folder => $invindex->get_folder,
agent_id => $hostname,
);
my $reader = KinoSearch::Index::IndexReader->open(
invindex => $invindex,
lock_factory => $lock_factory,
);
return KinoSearch::Searcher->new(
invindex => $invindex,
reader => $reader
);
Am I doing something wrong?
Also, on a side note, the docs here:
http://www.rectangular.com/kinosearch/docs/devel/KinoSearch/Store/LockFactory.html
say to use KinoSearch::Index::IndexReader->new(), not ->open(), but
that gives an error.
Thanks,
Scott