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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to