Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: discuss

Searcher->num_wanted

 

 

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded


peter at peknet

Feb 15, 2008, 8:38 PM

Post #1 of 3 (932 views)
Permalink
Searcher->num_wanted

How do I tell the Searcher "give me all the hits"?

--
Peter Karman . http://peknet.com/ . peter [at] peknet

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


marvin at rectangular

Feb 15, 2008, 10:16 PM

Post #2 of 3 (875 views)
Permalink
Re: Searcher->num_wanted [In reply to]

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/


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


sprout at cpan

Feb 15, 2008, 10:26 PM

Post #3 of 3 (874 views)
Permalink
Re: Searcher->num_wanted [In reply to]

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
http://www.rectangular.com/mailman/listinfo/kinosearch

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.