Just like {@link #Optimize()}, except you can specify whether the call should block until the optimize completes. This is only meaningful with a {@link MergeScheduler} that is able to run merges in background threads.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Namespace: Lucene.Net.Index
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual void Optimize(
	bool doWait
)
Visual Basic
Public Overridable Sub Optimize ( _
	doWait As Boolean _
)
Visual C++
public:
virtual void Optimize(
	bool doWait
)

Parameters

doWait
Type: System..::..Boolean

[Missing <param name="doWait"/> documentation for "M:Lucene.Net.Index.IndexWriter.Optimize(System.Boolean)"]

See Also