Method ForceMergeDeletes
ForceMergeDeletes(Boolean)
Just like ForceMergeDeletes(), except you can specify whether the call should block until the operation completes. This is only meaningful with a MergeScheduler that is able to run merges in background threads.
NOTE: if this method hits an
NOTE: if you call Dispose(Boolean)
with false
, which aborts all running merges,
then any thread still running this method might hit a
MergePolicy.MergeAbortedException.
Declaration
public virtual void ForceMergeDeletes(bool doWait)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | doWait |
ForceMergeDeletes()
Forces merging of all segments that have deleted documents. The actual merges to be executed are determined by the MergePolicy. For example, the default TieredMergePolicy will only pick a segment if the percentage of deleted docs is over 10%.
This is often a horribly costly operation; rarely is it warranted.
To see how many deletions you have pending in your index, call NumDeletedDocs.
NOTE: this method first flushes a new segment (if there are indexed documents), and applies all buffered deletes.
NOTE: if this method hits an
Declaration
public virtual void ForceMergeDeletes()