A {@link IndexDeletionPolicy} that wraps around any other {@link IndexDeletionPolicy} and adds the ability to hold and later release a single "snapshot" of an index. While the snapshot is held, the {@link IndexWriter} will not remove any files associated with it even if the index is otherwise being actively, arbitrarily changed. Because we wrap another arbitrary {@link IndexDeletionPolicy}, this gives you the freedom to continue using whatever {@link IndexDeletionPolicy} you would normally want to use with your index. Note that you can re-use a single instance of SnapshotDeletionPolicy across multiple writers as long as they are against the same index Directory. Any snapshot held when a writer is closed will "survive" when the next writer is opened.

WARNING: This API is a new and experimental and may suddenly change.

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

Syntax

C#
public class SnapshotDeletionPolicy : IndexDeletionPolicy
Visual Basic
Public Class SnapshotDeletionPolicy _
	Implements IndexDeletionPolicy
Visual C++
public ref class SnapshotDeletionPolicy : IndexDeletionPolicy

Inheritance Hierarchy

System..::..Object
  Lucene.Net.Index..::..SnapshotDeletionPolicy

See Also