Lucy::...Reader(3pm)

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

πŸ’– Lucy::Index::PostingListReader β€” the tea β˜•

okay so bestie, welcome to Lucy::...Reader(3pm) from the User Contributed Perl Documentation collection 🫢. This one's called Lucy::Index::PostingListReader, and no cap, it's the little reader that hands you the receipts on which documents matched your terms. Let's get into it πŸ’…


✨ NAME ✨

Lucy::Index::PostingListReader β€” literally just here to read postings data. that's the whole job. iconic behavior tbh 🌸


✨ SYNOPSIS ✨

okay so here's how you'd actually summon one, fr fr:

my $posting_list_reader
    = $seg_reader->obtain("Lucy::Index::PostingListReader");
my $posting_list = $posting_list_reader->posting_list(
    field => 'title',
    term  => 'foo',
);

see? you obtain it off the segment reader, then you ask it for a posting list. easy. slay ✨


✨ DESCRIPTION ✨

PostingListReaders produce PostingList objects, and those objects are the ones that convey document matching information πŸ‘‘. So like β€” you want to know which docs hit on a term? That's this whole vibe. The posting list is the main character, and this reader is the one introducing you πŸ’–


✨ ABSTRACT METHODS ✨

heads up bestie, these are abstract β€” the base class is basically saying "you go implement this," so don't come for it when it doesn't do the thing πŸ™ˆ

πŸŽ€ posting_list πŸŽ€

my $posting_list = $posting_list_reader->posting_list(
    field => $field,  # default: undef
    term  => $term,   # default: undef
);

Returns a PostingList. BUT β€” and this is the important part β€” it returns undef if either:

  • "field" is undef, or
  • "field" is not present in any documents πŸ’€

so like, no field, no docs, no posting list. checks out.

Here's the arg breakdown bestie:

  • field β€” a field name. that's it, that's the arg πŸ“
  • term β€” if you supply this, the PostingList gets pre-located to this term using seek(). fancy ✨

✨ METHODS ✨

πŸ¦‹ aggregator πŸ¦‹

my $result = $posting_list_reader->aggregator(
    readers => $readers,  # required
    offsets => $offsets,  # required
);

Returns undef 🫠 β€” because PostingLists may only be iterated at the segment level. That's just the rules, bestie. Segment level only. no negotiating πŸ’…


✨ INHERITANCE ✨

the family tree goes like this, no cap:

Lucy::Index::PostingListReader isa Lucy::Index::DataReader isa Clownfish::Obj.

three generations of iconic lineage πŸ‘‘


🌈 SEE ALSO 🌈

okay so the original page didn't give us a SEE ALSO section... so there's nothing to link out to here. no cross-refs, no crumbs, nothing. we move πŸ’€


and that's the whole page bestie!! this one came to you from perl v5.42.0, dated 2025-07-25, and yeah the manual page name is literally Lucy::...Reader(3pm) β€” yes the dots are real, they're not a typo, that's just how it's filed πŸ˜­πŸ’–

go read some postings. you got this. mwah 🫢✨

πŸ“¦ where this page comes from