Lucy::...ngList(3pm)
π Lucy::Index::PostingList π
okay bestie, so this page lives in the User Contributed Perl Documentation section, and it's all about Lucy::Index::PostingList β no cap, it's literally just Term-Document pairings. β¨
β¨ NAME β¨
Lucy::Index::PostingList β Term-Document pairings. that's the whole vibe. π
πΈ SYNOPSIS πΈ
here's the tea, copy-paste it exactly:
my $posting_list_reader
= $seg_reader->obtain("Lucy::Index::PostingListReader");
my $posting_list = $posting_list_reader->posting_list(
field => 'content',
term => 'foo',
);
while ( my $doc_id = $posting_list->next ) {
say "Matching doc id: $doc_id";
}
like. look at her go. π¦
π DESCRIPTION π
PostingList is an iterator β and the way that it works is it supplies a list of document ids that match a given term. periodt. π
if you wanna know what a "posting" even is, or what a "posting list" is, go check out IRTheory for the definitions. iykyk. π
π₯ ABSTRACT METHODS π₯
these are abstract, so somebody else's subclass is doing the actual heavy lifting, but here's what they promise to do:
β get_doc_freq β
my $int = $posting_list->get_doc_freq();
returns the number of documents that the PostingList contains. and heads up β this number will include any documents which have been marked as deleted but not yet purged. so it's giving "count includes the ghosts" energy. π
β seek β
$posting_list->seek($target);
$posting_list->seek(); # default: undef
gets the PostingList object all prepped and ready to iterate over matches for documents that match target. slay. π«Ά
targetβ the term to match. if it'sundef, the iterator will be empty. (sad girl hours, but that's the rule.) π
π INHERITANCE π
Lucy::Index::PostingList isa Lucy::Search::Matcher isa Clownfish::Obj. it's a whole family tree, and she's the main character. π
and that's the page, bestie!! π this was served up by perl v5.42.0 on 2025-07-25, under the name Lucy::...ngList(3pm). mwah. πβ¨π
π¦ where this page comes from
- fedora 43: perl-Lucy 0.6.2-26.fc43 Β· Apache-2.0 AND MIT AND Unicode-DFS-2015
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms