Constructor MMapDirectory
MMapDirectory(DirectoryInfo, LockFactory)
Create a new MMapDirectory for the named location.
Declaration
public MMapDirectory(DirectoryInfo path, LockFactory lockFactory)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | path | the path of the directory |
LockFactory | lockFactory | the lock factory to use, or null for the default (NativeFSLockFactory); |
MMapDirectory(DirectoryInfo)
Create a new MMapDirectory for the named location and NativeFSLockFactory.
Declaration
public MMapDirectory(DirectoryInfo path)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | path | the path of the directory |
MMapDirectory(DirectoryInfo, LockFactory, Int32)
Create a new MMapDirectory for the named location, specifying the maximum chunk size used for memory mapping.
Declaration
public MMapDirectory(DirectoryInfo path, LockFactory lockFactory, int maxChunkSize)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | path | the path of the directory |
LockFactory | lockFactory | the lock factory to use, or |
System.Int32 | maxChunkSize | maximum chunk size (default is 1 GiBytes for 64 bit runtimes and 256 MiBytes for 32 bit runtimes) used for memory mapping.
Especially on 32 bit platform, the address space can be very fragmented,
so large index files cannot be mapped. Using a lower chunk size makes
the directory implementation a little bit slower (as the correct chunk
may be resolved on lots of seeks) but the chance is higher that mmap
does not fail. On 64 bit platforms, this parameter should always
be Please note: The chunk size is always rounded down to a power of 2. |
MMapDirectory(String, LockFactory)
Create a new MMapDirectory for the named location.
LUCENENET specific overload for convenience using string instead of
Declaration
public MMapDirectory(string path, LockFactory lockFactory)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | the path of the directory |
LockFactory | lockFactory | the lock factory to use, or null for the default (NativeFSLockFactory); |
MMapDirectory(String)
Create a new MMapDirectory for the named location and NativeFSLockFactory.
LUCENENET specific overload for convenience using string instead of
Declaration
public MMapDirectory(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | the path of the directory |
MMapDirectory(String, LockFactory, Int32)
Create a new MMapDirectory for the named location, specifying the maximum chunk size used for memory mapping.
LUCENENET specific overload for convenience using string instead of
Declaration
public MMapDirectory(string path, LockFactory lockFactory, int maxChunkSize)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | the path of the directory |
LockFactory | lockFactory | the lock factory to use, or |
System.Int32 | maxChunkSize | maximum chunk size (default is 1 GiBytes for 64 bit runtimes and 256 MiBytes for 32 bit runtimes) used for memory mapping.
Especially on 32 bit platform, the address space can be very fragmented,
so large index files cannot be mapped. Using a lower chunk size makes
the directory implementation a little bit slower (as the correct chunk
may be resolved on lots of seeks) but the chance is higher that mmap
does not fail. On 64 bit platforms, this parameter should always
be Please note: The chunk size is always rounded down to a power of 2. |