lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Rubin" <andre.ru...@gmail.com>
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 = searcher.search(query, 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 http://wiki.apache.org/lucene
-java/ImproveSearchingSpeed

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?


Thanks,


Andre

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