[KinoSearch] Searcher->num_wanted
Marvin Humphrey
marvin at rectangular.com
Fri Feb 15 22:16:21 PST 2008
On Feb 15, 2008, at 8:38 PM, Peter Karman wrote:
> How do I tell the Searcher "give me all the hits"?
my $hits = $searcher->search(
query => $query,
num_wanted => $searcher->max_doc,
);
Two notes:
First, we need to make a documentation change. Searcher->max_doc
should be made public -- or rather, Searchable should be made public
along with Searchable->max_doc, and the Searcher docs should indicate
the inheritance chain.
Second, the code above is potentially expensive for large indexes, as
it creates a HitQueue with room for max_doc() elements.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
More information about the kinosearch
mailing list