lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Lucene-java Wiki] Update of "ImproveSearchingSpeed" by RobertMuir
Date Thu, 03 Nov 2011 23:15:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification.

The "ImproveSearchingSpeed" page has been changed by RobertMuir:

die optimize die

   You must re-open the [[|IndexSearcher]]
in order to make newly committed changes visible to searching.  However, re-opening the searcher
has a certain overhead (noticeable mostly with large indexes and with sorting turned on) and
should thus be minimized.  Consider using a so called [[|warming]]
technique which allows the searcher to warm up its caches before the first query hits.
-  * '''Run [[|optimize]]
on your index before searching.'''
-  An optimized index has only 1 segment to search which can be much faster than the many
segments that will normally be created, especially for a large index.  If your application
does not often update the index then it pays to build the index, optimize it, and use the
optimized one for searching.  If instead you are frequently updating the index and then refreshing
searchers, then optimizing will likely be too costly and you should decrease mergeFactor instead.
   * '''Decrease [[|mergeFactor]].'''
   Smaller mergeFactors mean fewer segments and searching will be faster.  However, this will
slow down indexing speed, so you should test values to strike an appropriate balance for your

View raw message