Lucy::...ngList(3pm)

πŸ“¦
version 0.6.2 Β· 2 versions
, in fedora 43

πŸ’– 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's undef, 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