lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Gelderbloem" <Peter.Gelderbl...@mediasurface.com>
Subject Switching from FSDirectory to RAMDirectory
Date Tue, 06 Sep 2005 12:25:37 GMT

Hi,
I find that unit tests that modify an existing record in the Lucene
index by removing it , modifying it and re-adding it, fails if I switch
from an FSDirectory to a RAMDirectory.
This code gives me a Directory that works:

FSDirectory fsDirectory =
FSDirectory.getDirectory(physicalDirectoryName, 
	
!IndexReader.indexExists(physicalDirectoryName));
returnValue = /*new RAMDirectory(*/fsDirectory/*)*/;

This code gives me a non-working Directory:

FSDirectory fsDirectory =
FSDirectory.getDirectory(physicalDirectoryName, 
	
!IndexReader.indexExists(physicalDirectoryName));
returnValue = new RAMDirectory(fsDirectory);

Please help!
The only solution I can think of involves pulling out my hair...
:(


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message