[KinoSearch] Searcher->num_wanted

Father Chrysostomos sprout at cpan.org
Fri Feb 15 22:26:17 PST 2008




On Feb 15, 2008, at 10:16 PM, Marvin Humphrey wrote:

>
> 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.

Does infinity work? Can one write num_wanted => 9**9**9?


_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch




More information about the kinosearch mailing list