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: fast Result Count
Date Tue, 09 Feb 2010 17:41:07 GMT
I'm not sure what you mean by "loading them all into memory".

I'm pretty sure that the numHits you specify just limits the number
of documents kept in the internal ScoreDocs, and getTotalHits
can easily be much greater than numHits. But that would be
trivial to test (you shouldn't take my word for this one <G>)...

HTH
Erick

On Tue, Feb 9, 2010 at 11:44 AM, Klaus Teller <klaus.teller@gmx.net> wrote:

> Hi Guys,
>
> Is there a way to speed up couting documents that satisfy a search query
> other than by using TopDocCollector.getTotalHits()?
>
> For instance, if there are 1000000 documents satisfying my search query,
> how can I count them without loading them all in memory?
>
> Thanks,
> Klaus.
> --
> Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5
> -
> sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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