lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <DCutt...@grandcentral.com>
Subject RE: Converting a FSDirectory (on disk index) to a RAMDirectory
Date Thu, 21 Feb 2002 21:33:25 GMT
> From: Spencer, Dave [mailto:dave@lumos.com]
> 
> Could anyone glance at this and verify that this code is correct.
> Goal is to convert an existing, on-disk, index to a 
> RAMDirectory, which presumably is purely in memory.

It looks right to me.  Did you test it?  Did it work?

> If the code is correct I'd suggest someone w/ CVS powers adding it to
> the source base - maybe a static method in  RAMDirectory itself.

How about a RAMDirectory constructor?  Since only generic Directory methods
are required it could just be:

  public RAMDirectory(Directory dirToCopy) { ... }

and, as conveniences:

  public RAMDirectory(File f)   { this(new FSDirectory(f)); }
  public RAMDirectory(String s) { this(new FSDirectory(s)); }

Doug

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message