Hi,

I looked at the code: The FSDirectory passed to RAMDirectory could be changed 
to Directory easily. The additional check for "not is a directory inode" is in 
my opinion lo longer needed, because listFiles should only return files.

Can you open an issue about to change the FSDirectory in the RAMDirectory ctor 
to be changed to Directory?

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de

> -----Original Message-----
> From: Rob Audenaerde [mailto:rob.audenae...@gmail.com]
> Sent: Thursday, June 30, 2016 12:00 PM
> To: java-user@lucene.apache.org
> Subject: clone RAMDirectory
> 
> Hi all,
> 
> For increasing the speed of some of my application tests, I want to
> re-use/copy a pre-populated RAMDirectory over and over.
> 
> I'm on Lucene 6.0.1
> 
> It seems an RAMDirectory can be a copy of a FSDirectory, but not of another
> RAMDirectory. Also RAMDirectory is not Clonable.
> 
> What would be the 'proper' approach to re-use (fast copy) pre-populated
> indices over tests? I know I can create a FSDirectory and copy that, but
> then I also need to take into account temporary files etc.
> 
> Thanks in advance,
> 
> - Rob


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

Reply via email to