Read this, then you will see that MMapDirectory will use 0% of your Java Heap 
space or free system RAM:

http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: William Bell [mailto:billnb...@gmail.com]
> Sent: Tuesday, July 17, 2012 6:05 AM
> Subject: How to setup SimpleFSDirectoryFactory
> 
> We all know that MMapDirectory is fastest. However we cannot always use it
> since you might run out of memory on large indexes right?
> 
> Here is how I got iSimpleFSDirectoryFactory to work. Just set -
> Dsolr.directoryFactory=solr.SimpleFSDirectoryFactory.
> 
> Your solrconfig.xml:
> 
> <directoryFactory name="DirectoryFactory"
> class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
> 
> You can check it with http://localhost:8983/solr/admin/stats.jsp
> 
> Notice that the default for Windows 64bit is MMapDirectory. Else
> NIOFSDirectory except for WIndows.... It would be nicer if we just set it all 
> up
> with a helper in solrconfig.xml...
> 
> if (Constants.WINDOWS) {
>      if (MMapDirectory.UNMAP_SUPPORTED && Constants.JRE_IS_64BIT)
>         return new MMapDirectory(path, lockFactory);
>      else
>         return new SimpleFSDirectory(path, lockFactory);
>      } else {
>         return new NIOFSDirectory(path, lockFactory);
>       }
> }
> 
> 
> 
> --
> Bill Bell
> billnb...@gmail.com
> cell 720-256-8076


Reply via email to