KinoSearch::Index::PostingList - Term-Document pairings.
# PostingList is an abstract base class. Objects which subclass it can be
# obtained via IndexReader's posting_list() method.
my $posting_list = $reader->posting_list(
field => 'content',
term => 'foo',
);
while ( my $doc_num = $posting_list->next ) {
say "Matching doc num: $doc_num";
}
PostingList is an iterator which supplies a list of document numbers that match a given term. See KinoSearch::Docs::IRTheory for a more detailed explanation.
Prepare the PostingList object to iterate over matches for documents that
match target.
Advance the iterator to the next document.
Returns: A positive document number, or 0 once the iterator is exhausted.
Return the iterator's current document number. Should not be called before the iterator is initialized or after it empties.
Return the number of documents that the PostingList contains. (This number will include any documents which have been marked as deleted but not yet purged.)
KinoSearch::Index::PostingList isa KinoSearch::Obj.
Copyright 2005-2008 Marvin Humphrey
See KinoSearch version 0.20.