Here is some stand-alone code that reproduces the problem. There are 2
classes. jvm1 creates the index, jvm2 reads the index. The system console
input is used to synchronize the 4 steps.
jvm1:
--
import java.io.File;
import java.util.Scanner;
import
Are you using Lucene 2.9?
Yes
Peter
On Sun, Nov 8, 2009 at 6:23 PM, Peter Keegan peterlkee...@gmail.com wrote:
Here is some stand-alone code that reproduces the problem. There are 2
classes. jvm1 creates the index, jvm2 reads the index. The system console
input is used to synchronize the 4
OK, thanks for the tests... this test also reproduces it:
public void testPrepareCommitIsCurrent() throws Throwable {
Directory dir = new MockRAMDirectory();
IndexWriter writer = new IndexWriter(dir, new
WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
Document doc = new
Hmm... for step 4 you should have gotten true back from isCurrent.
You're sure there were no intervening calls to IndexWriter.commit?
Are you using Lucene 2.9? If not, you have to make sure autoCommit
is false when opening the IndexWriter.
Mike
On Fri, Nov 6, 2009 at 2:46 PM, Peter Keegan