Lucy::Search::Collector::BitCollector3pm
Collector which records doc nums in a bitvector.
Usage
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,);
Overview
BitCollector is a Collector which saves matching document ids in a BitVector. It is useful for recording the entire set of documents which matches a query.
Constructors
new( [labeled params] )
my $bit_collector = Lucy::Search::Collector::BitCollector->new(bit_vector => $bit_vec, # required);
- •
-
bit_vector- A Lucy::Object::BitVector.
Methods
collect(doc_id)
Set bit in the object's BitVector for the supplied doc id.
Inheritance
Lucy::Search::Collector::BitCollector isa Lucy::Search::Collector isa Lucy::Object::Obj.
Releases
2 releases since Debian 8 (Jessie); the text changed 1 time.