I was able to improve the behavior by setting the mapped ByteBuffer to null
in the close method of MMapIndexInput. This seems to be a strong enough
'suggestion' to the gc, as I can see the references go away with process
explorer, and the index files can be deleted, usually. Occasionally, a
refere
Peter Keegan wrote:
There is no 'unmap' method, so my understanding is that the file mapping is
valid until the underlying buffer is garbage-collected. However, forcing
the gc doesn't help.
You're half right.
The file mapping is indeed valid until the underlying buffer is garbage
collected,
I'm reposting this from java-dev to java-user for greater exposure.
My search process is using MMapDirectory on a read-only index via:
-Dorg.apache.lucene.FSDirectory.class=org.apache.lucene.store.MMapDirectory
Another indexing process is building the next version of the index in a
different di
If you can use all that memory for index, I would say RAM. For long running
indexes (to get os cache populated), MMAP will do just as good if you have any
file system worth using.
- Original Message
From: Michael Chan <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Sunday, 28