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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.