PersistentSnapshotDeletionPolicy

constructor(primary: IndexDeletionPolicy, dir: Directory)

PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting, passing OpenMode.CREATE_OR_APPEND by default.

Parameters

primary

the IndexDeletionPolicy that is used on non-snapshotted commits. Snapshotted commits, by definition, are not deleted until explicitly released via release.

dir

the Directory which will be used to persist the snapshots information.


constructor(primary: IndexDeletionPolicy, dir: Directory, mode: IndexWriterConfig.OpenMode)

PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Parameters

primary

the IndexDeletionPolicy that is used on non-snapshotted commits. Snapshotted commits, by definition, are not deleted until explicitly released via release.

dir

the Directory which will be used to persist the snapshots information.

mode

specifies whether a new index should be created, deleting all existing snapshots information (immediately), or open an existing index, initializing the class with the snapshots information.