Are you sure you even need to do this (manage separate RAMDir)? Ie what's driving this (performance)?
IndexWriter already has its own RAM buffer for newly added docs / deletions. You can use the new near-realtime API (IndexWriter.getReader) in 2.9 to reopen your IndexReader, for searching the full index plus all changes made with that IndexWriter instance... in my tests this gives very good performance even at rather high reopen frequency (10X per second). Mike 2009/11/24 Rafal Janik <rafal.ja...@softwaremind.pl>: > Hi all! > i've just started my adventure with Lucene i've got one question regarding > indexing. > Does Lucene have got built-in mechanism to store indexes first in RAM and > after some time or after some number of documents added to move them to FS? > And searching docs all the time in both 'storages' ? > I know the one reason is to use RAMDirectory and FS and move the indexes > 'by hand' but to do it i need two IndexWriters and two indexSearchers so i > have to join results. Is there any better way to do it? > > rafal > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org