lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Ferrara <>
Subject RAMDirectory issue
Date Sat, 26 May 2007 07:35:11 GMT
I have an index on the disk. I'm using RAMDirectory( String ) to load
index in RAM.
I need from time to time to reload the index (when it is not current
anymore), but I keep getting Out Of memory exception. Making the jvm
heap bigger  helps, but only allow more reloading, eventually it will
throw the exception.

I just make a IndexSearcher. I've noticed that when I use that searcher
I get the exception, instead while I do not search on the searcher I get
no exception.
The exception in throw while istancing the RAMDirectory. I do not make
any sort. I do close the searcher. I do even close
searcher.getIndexReader().directory().close(). It is like that, when
indexserver is used, some references still survive and ram directory is
not freed.

How should I use the RAMDirectory? It is something related to the
Can I have 2 ramdirectory, or try to use the same one by putting in it,
with copy maybe, the index I have on disk?

-- Walter

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message