lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Strategy for optimal read-only index
Date Tue, 25 Jun 2013 17:01:47 GMT
On Tue, Jun 25, 2013 at 12:49 PM, Sriram Sankar <> wrote:
> I have a use case where I build my index only occasionally and am willing
> to pay the cost to build a read-only index that occupies as small a memory
> footprint as possible and also remains efficient for  posting list
> traversal.  I.e., I will not be making any changes at all once it is built.
> 1. What is the best strategy to build this index - is there the equivalent
> of an "optimize()" method (it seems to be gone now, is there a specific
> codec I can use, etc.

optimize() was renamed to forceMerge(1)

> 2. Do we get any better read (posting list traversal essentially)
> performance by doing this (as opposed to using a mutable index)?

You save seeks when the index has only one segment (optimized) but if
the index fits entirely in RAM this may not matter much.

You also have fewer open files, in case that matters...

Test both and report back!

Mike McCandless

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message