lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: TopDocCollector & Paging
Date Wed, 17 Sep 2008 14:16:45 GMT
Doesn't TopDocCollector have a getTotalHits method?

Remember that in order to get the top N documents, a
all documents must be examined. I believe that the
numHits parameter passed to the constructor just
limits the number of hits stored in (and thus the size)
of the TopDocs object....

Best
Erick

On Wed, Sep 17, 2008 at 7:37 AM, Dino Korah <dckorah@gmail.com> wrote:

> Hello All,
>
> Anyone has tried  this?
>
> My UI has a requirement to show total number of results and then show
> results in pages. How do I do that with TopDocCollector, without having to
> run search() twice, one to get the total number of hits and then the next
> one to get the page being displayed. (like the
> demo::SearchFiles::doPagingSearch())
>
> In my case I am to search on a few hundred million document index; scoring
> is expensive.
>
> Many thanks,
> Dino
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message