MMapDirectory is one of the specific subclasses of the abstract FSDirectory class. It uses memory mapped files to access information in the index.
Other parameters: SimpleFSDirectory and NIOFSDirectory , which use different methods. You should look at the documentation for FSDirectory for a brief explanation of all three. As you will see there, FSDirectory.open(File) tries to choose the best implementation for your environment.
In my own experience, I did not notice a significant performance difference between NIOFSDirectory and MMapFSDirectory , but you should do some performance testing using your own data and hardware settings.
In the case of using MMapFSDirectory , virtual memory and index size can only be a problem on a 32-bit machine ( if your indexes are more than 2 ^ 48 bits = 32 TB ).
Martin blech
source share