lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Rubin" <>
Subject Performance, yet again
Date Tue, 02 Sep 2008 17:06:09 GMT
Hi all,

Most of our queries are very simple, of the type:

Query query = new PrefixQuery(new Term(LABEL_FIELD, prefix));
Hits hits =, new Sort(new SortField(LABEL_FIELD)))

Which sometimes result in 10, 20, sometimes 40 thousand hits.

I get good performance if hits.length is 20.000 or less (less than 0.5
seconds). I However, if it is 40.000 or more, querying takes over a second,
up to 2.5 seconds. Point in check here is that this solution is not scaling.
Any ideas I can try?

I already exhausted the ideas from

I was reading about TopDocs and TopFieldDocs. Is this search method (using
TopDocs) preferred over Hits? Also, there's no constructor for them without
a Filter, can I just pass null?

Is it possible to pre-sort the index, so I don't have to every time I
perform a query?

Any other ideas?



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