Sets the maximum number of bytes read at once from the
underlying file during {@link IndexInput#readBytes}.
The default value is {@link #DEFAULT_READ_CHUNK_SIZE};
This was introduced due to Sun
JVM Bug 6478546, which throws an incorrect
OutOfMemoryError when attempting to read too many bytes
at once. It only happens on 32bit JVMs with a large
maximum heap size.Changes to this value will not impact any
already-opened {@link IndexInput}s. You should call
this before attempting to open an index on the
directory.NOTE: This value should be as large as
possible to reduce any possible performance impact. If
you still encounter an incorrect OutOfMemoryError,
trying lowering the chunk size.
Namespace: Lucene.Net.StoreAssembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
public void SetReadChunkSize( int chunkSize ) |
Visual Basic |
---|
Public Sub SetReadChunkSize ( _ chunkSize As Integer _ ) |
Visual C++ |
---|
public: void SetReadChunkSize( int chunkSize ) |
Parameters
- chunkSize
- Type: System..::..Int32
[Missing <param name="chunkSize"/> documentation for "M:Lucene.Net.Store.FSDirectory.SetReadChunkSize(System.Int32)"]