Dear Roger,
Thanks for the idea. I think the hits.getLength() / 10 is better choice than a loop (increment counter by number of results per page).
Thanks again, Ferenc
Roger Dunk wrotte:
The way I do it is thus:
When hits.totalIsExact(), the final page can be found simply from hits.getTotal()
When NOT hits.totalIsExact(), I run the query again, this time retrieving say 1000 urls (the max number of results I allow to be returned). Using a loop (increment counter by number of results per page), I can therefore determine when we reach the last record, and hence what the final page is.
Cheers... Roger
----- Original Message ----- From: "Feri" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 01, 2005 1:50 AM Subject: hits page list
Dear Developers,
I have a problem:
I would like a page list (1-10) to end of hit-list (as google).
I have a problem when more hits from a site, the Hits.getTotal() not return by the real end of the hits.
When I click to eg. on the 3. page, the result is an empty page (NutchBean.search is out of the range).
------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/Info/Sentarus/hamr30 _______________________________________________ Nutch-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nutch-developers
