lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Problems with RAMDirectory in Solr
Date Fri, 01 Oct 2010 21:41:35 GMT

: Hello. We just recently started using a RAMDirectory with Solr and found a
: problem. When we restart the Solr, the RAMDirectory is refreshed as
: expected. Hwoever when we use the snapinstaller script to update the index,
: the RAMDirectory is not updated. Is there any way to update the RAMDirectory
: after every commit? Thanks.

The snapinstaller script are garunteed to never work with a RAMDirectory 
based Solr setup -- all those scripts do is manage some hardlinks on the 
filesystem and trigger a commit -- nothing about them will copy from a 
FSDirectory to a RAMDirectory.

Using the newer Java based replication *might* work, but i'm not sure 
about that -- i think it probably only works with the 
StandardDirectoryProvider, but it could possibly be made to work (if it 
doesn't already) by writing code to bulk copy the "files" from an 
FSDirectory opened on disk to the RAMDirectory.

Honestly though: this seems like it defeats the point of using a 
RAMDirectory (totally transient memory only indexes).  If your goal is to 
have an index read from disk, that is then kept entirely in memory, why 
not just leave some memory available for the OS's file system cache and 
let it do it's job?  (add a few warming queries to ensure the index pages 
are read into ram, and you should be in business)


--  ...  October 7-8, Boston      ...  Stump The Chump!

View raw message