Lucy::...llector(3pm)
π 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β aLucy::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
- 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