lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: Memory Usage
Date Thu, 10 Nov 2005 01:19:52 GMT

On Nov 9, 2005, at 4:48 PM, Daniel Noll wrote:
> My question is: is this 1/128 figure set in stone, or can it be  
> changed without major consequences?

You want indexInterval.  Here's an excerpt from the docs in  
TermInfosWriter.

   // TODO: the default values for these two parameters
   // should be settable from IndexWriter.  However, once
   // that's done, folks will start setting them to
   // ridiculous values and complaining that things don't
   // work well, as with mergeFactor.  So, let's wait until
   // a number of folks find that alternate values work better.
   // Note that both of these values are stored in the segment,
   // so that it's safe to change these w/o rebuilding all indexes.

   /** Expert: The fraction of terms in the "dictionary" which
    * should be stored in RAM.  Smaller values use more memory,
    * but make searching slightly faster, while larger values
    * use less memory and make searching slightly slower.  Searching
    * is typically not dominated by dictionary lookup, so
    * tweaking this is rarely useful.*/
   int indexInterval = 128;

I believe that it is settable  via setTermIndexInterval() in  
IndexWriter.

> I would rather have an application which used less memory and took  
> longer, than one which uses all the available RAM just to milk out  
> a bit of extra speed.

You have grasped the tradeoff precisely.

Best,

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


---------------------------------------------------------------------
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