Eugen Kochuev wrote:
> Hello nutch-user,
> 
>   I'm rewriting JSP front-end to add pager (currently there's only
>   "Next page" button) and I have faced a difficulty, that actually I
>   cannot get the number of matches if the hits are filtered to show
>   only 2 results by domain. How could this be resolved? Where this
>   filtering is done and the exact number of pages is lost? Please
>   advise.

Hi,

I've got a pending nutch-issue on this
http://issues.apache.org/jira/browse/NUTCH-288

A dirty workaround (though working) is to do a search with one hit per
page and start-index as 99999. That will give you the actual start-index
of the last item, which +1 is the number of results you are looking for.
Since requesting the last page takes a bit resources, you might want to
cache that result actually - so users searching again or navigating
through pages get the number of pages faster.

PS: For the OpenSearch-connector to not throw an exception but to return
the last page, please apply the patch I attached to the bug.


Regards,
 Stefan

Reply via email to