You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Marcus Falck <ma...@observer.se> on 2006/08/16 10:46:33 UTC

addIndexes method without the merge

Hi,

 

In my search engine (based on top of the lucene 1.4.3 api) I'm using one
RAMDir as a live indexing buffert and one FSDir as the main persisted
index.

 

When the RAMDir buffert has been filled I'm adding those documents to
the FSDir and clear the RAMDir. 

 

At first I was iterating thru the RAMDir and added every document to the
FSDir. But that turned out to be very inefficient. So I tried to use the
addIndexes method but soon I realized that the addIndexes method will
always leave me with one optimized file ( as long as the maxMergeDocs
hasn't been reached ??).  Then I tried to do my own
addIndexesWithoutOptimize method which main purpose is to ALWAYS create
a new segment file for the directory added to it. At first this method
seemed to work but after a while I realized that this was not the case,
my method seems to do some minor screw up to the index.

 

So I'm wondering if somebody could help my do a new method?

 

 

/

Regards

Marcus