lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <>
Subject RE: addIndexes()
Date Fri, 01 Jun 2007 00:32:20 GMT

On Thu, 31 May 2007, Steven Parkes wrote:

> Hmmm ... something's not meshing for me here.
> If I understood what you've said, you have a DbD index to which you are
> addIndexes'ing a memory index? I must have missed something, because
> addIndexes pre- and post-optimizes the target (Dbd) index, not the
> operand (mem) index.

I stand corrected. I'm using an IndexWriter opened on a RAMDirectory to do the 
indexing for a given transaction. Then I call addIndexes([writer]) on the 
IndexWriter backed by the DbDirectory to persist this. This approach ash 
turned out to be considerably faster and less noisy in the database (the 
amount of random access changes) than indexing into the DbDirectory backed 
index directly and then optimizing it.

The docs for addIndexes() say "After this completes, the index is optimized." 
I mistakenly thought that there was discussion here about making this no 
longer be the case.


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

View raw message