Lucy::...llector(3pm)

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

πŸ’– Lucy::Search::Collector::BitCollector β€” a.k.a. Lucy::...llector(3pm) πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation corner of the internet 🌸 this one is short and sweet and honestly kinda iconic.


✨ NAME ✨

Lucy::Search::Collector::BitCollector β€” a Collector that records doc nums in a BitVector. no cap, that's literally the whole job description πŸŽ€


✨ SYNOPSIS ✨

my $bit_vec = Lucy::Object::BitVector->new(
    capacity => $searcher->doc_max + 1,
);
my $bit_collector = Lucy::Search::Collector::BitCollector->new(
    bit_vector => $bit_vec,
);
$searcher->collect(
    collector => $bit_collector,
    query     => $query,
);

✨ DESCRIPTION ✨

BitCollector is a Collector that saves matching document ids in a BitVector. πŸ’…

It's giving "I just want the entire set of documents that matches a query" energy. That's the vibe. That's the assignment. If you need to remember every single doc that matched, this is your girl 🫢


✨ CONSTRUCTORS ✨

🌟 new

my $bit_collector = Lucy::Search::Collector::BitCollector->new(
    bit_vector => $bit_vec,    # required
);

Creates a new BitCollector. brand new, fresh out the box ✨

  • bit_vector β€” a Lucy::Object::BitVector. yeah it's required, don't skip it bestie 😭

✨ METHODS ✨

🌟 collect

$bit_collector->collect($doc_id);

Sets the bit in the object’s BitVector for the doc id you hand it. one doc in, one bit flipped, done 🎯


✨ INHERITANCE ✨

Lucy::Search::Collector::BitCollector isa Lucy::Search::Collector isa Clownfish::Obj.

the whole family tree, right there πŸ‘‘


that's the whole page, bestie, you ate it πŸ’…βœ¨

signing off with love from perl v5.42.0, dated 2025-07-25 β€” catch you in the next Lucy::...llector(3pm) πŸ’–πŸ¦‹

πŸ“¦ where this page comes from