I'm looking for the fastest way to collect the full set of results
from a search. Here's what I'm using currently:
my $hits = $index->search($query);
my $collector = KinoSearch::Search::BitCollector->new();
$hits->{searcher}->search_hit_collector(
hit_collector => $collector,
weight => $hits->{weight}
);
my @result_ids = @{$collector->get_bit_vector()->to_arrayref};
What I'm finding is that it takes MUCH longer to call
search_hit_collector that the initial search than I'd expect. The
initial search on my index takes something like .004s, while the
search_hit_collector_call brings processing speed to 0.11s.
Is there any faster way to pull out all the ids for an executed search?
Thanks again and in advance!
Best,
Matthew
from a search. Here's what I'm using currently:
my $hits = $index->search($query);
my $collector = KinoSearch::Search::BitCollector->new();
$hits->{searcher}->search_hit_collector(
hit_collector => $collector,
weight => $hits->{weight}
);
my @result_ids = @{$collector->get_bit_vector()->to_arrayref};
What I'm finding is that it takes MUCH longer to call
search_hit_collector that the initial search than I'd expect. The
initial search on my index takes something like .004s, while the
search_hit_collector_call brings processing speed to 0.11s.
Is there any faster way to pull out all the ids for an executed search?
Thanks again and in advance!
Best,
Matthew