lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Performance, yet again
Date Tue, 02 Sep 2008 18:04:57 GMT

: I was trying, before, to use it, but it doesn't seem as straightfoward as
: Hits. Is there an example code, somewhere?

"SearchFiles.java" in the Lucene demo was updated to use TopDocCollector 
when Hits was deprecated.

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

Sorting by document order is very fast, so if you only care about one sort 
order and you cna add your docs in that order, that's one thing that can 
help ... otherwise just reuse the same IndexReader as much as possible so 
your don't waste the FieldCache.

(if you have the luxury of adding docs in a set order that you search byu, 
odds are you aren't upating your index on the fly, so you should be ableto 
reuse an IndexReader and it's FieldCaches for a while)




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message