lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Lucene - Search Optimization Problem
Date Sun, 24 Feb 2008 21:10:26 GMT
Op Sunday 24 February 2008 17:57:42 schreef Daniel Naber:
> On Sonntag, 24. Februar 2008, João Rodrigues wrote:
> > Problem is, unlike most of the posts I've read, I don't want the
> > first 10 or 100 results. I want the first 10.000, or even all of
> > them.
>
> See http://wiki.apache.org/lucene-java/ImproveSearchingSpeed, you
> will probably need to make use of the FieldCache.

Further to that, I got the impression that you're doing
document retrieval, IndexReader.document(...), in the
HitCollector (see also the javadocs of HitCollector).
If that is the case, well, that is a definite nono,
use a TopDocs  instead.

In case you really need a HitCollector: first collect _all_ the
doc numbers.

Normally, for best performance, retrieve the stored fields
in increasing order of doc numbers, even when using TopDocs.

Regards,
Paul Elschot


Mime
View raw message