I've never used KinoSearch, so this is just based on the docs and looking at the code. It should work, but I haven't actually compiled or run it.
The place to start is KinoSearch::Store::InvIndex. That is the abstract class the various stores are build around (I'm going to assume you are using KinoSearch::Store::FSInvIndex). You want the list and slurp_file methods.
As per the docs for KinoSearch::Store::FSInvIndex and KinoSearch::Store::InvIndex:
my $invindex = KinoSearch::Store::FSInvIndex->new( path => '/path/to/invindex', create => 0, ); my @list_of_filenames = $invindex->list; foreach my $filename (@list_of_filenames) { my $file_data = $invindex->slurp_file($filename); # Do stuff with data } $invindex->close;
In reply to Re: KinoSearch - is there a way to iterate over all documents in an index?
by snowhare
in thread KinoSearch - is there a way to iterate over all documents in an index?
by isync
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |