Uses of Class org.apache.lucene.index.IndexDeletionPolicy (Lucene 10.5.1 core API)
Description: use: package: org.apache.lucene.index, class: IndexDeletionPolicy

# Uses of Class
org.apache.lucene.index.IndexDeletionPolicy

Packages that use IndexDeletionPolicy
Package
Description
org.apache.lucene.index
Code to maintain and access indices.

- ## Uses of IndexDeletionPolicy in org.apache.lucene.index

  Subclasses of IndexDeletionPolicy in org.apache.lucene.index
  Modifier and Type
  Class
  Description
  `class`
  `KeepLastNCommitsDeletionPolicy`
  This `IndexDeletionPolicy` implementation keeps the last N commits and removes all prior commits after a new commit is done.
  `final class`
  `KeepOnlyLastCommitDeletionPolicy`
  This `IndexDeletionPolicy` implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done.
  `final class`
  `NoDeletionPolicy`
  An `IndexDeletionPolicy` which keeps all index commits around, never deleting them.
  `class`
  `PersistentSnapshotDeletionPolicy`
  A `SnapshotDeletionPolicy` which adds a persistence layer so that snapshots can be maintained across the life of an application.
  `class`
  `SnapshotDeletionPolicy`
  An `IndexDeletionPolicy` that wraps any other `IndexDeletionPolicy` and adds the ability to hold and later release snapshots of an index.
  Fields in org.apache.lucene.index declared as IndexDeletionPolicy
  Modifier and Type
  Field
  Description
  `protected IndexDeletionPolicy`
  LiveIndexWriterConfig.`delPolicy`
  `IndexDeletionPolicy` controlling when commit points are deleted.
  `static final IndexDeletionPolicy`
  NoDeletionPolicy.`INSTANCE`
  The single instance of this class.
  Methods in org.apache.lucene.index that return IndexDeletionPolicy
  Modifier and Type
  Method
  Description
  `IndexDeletionPolicy`
  IndexWriterConfig.`getIndexDeletionPolicy()`
  `IndexDeletionPolicy`
  LiveIndexWriterConfig.`getIndexDeletionPolicy()`
  Returns the `IndexDeletionPolicy` specified in `IndexWriterConfig.setIndexDeletionPolicy(IndexDeletionPolicy)` or the default `KeepOnlyLastCommitDeletionPolicy`/
  Methods in org.apache.lucene.index with parameters of type IndexDeletionPolicy
  Modifier and Type
  Method
  Description
  `IndexWriterConfig`
  IndexWriterConfig.`setIndexDeletionPolicy(IndexDeletionPolicy delPolicy)`
  Expert: allows an optional `IndexDeletionPolicy` implementation to be specified.
  Constructors in org.apache.lucene.index with parameters of type IndexDeletionPolicy
  Modifier
  Constructor
  Description
  ``
  `PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir)`
  `PersistentSnapshotDeletionPolicy` wraps another `IndexDeletionPolicy` to enable flexible snapshotting, passing `IndexWriterConfig.OpenMode.CREATE_OR_APPEND` by default.
  ``
  `PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode)`
  `PersistentSnapshotDeletionPolicy` wraps another `IndexDeletionPolicy` to enable flexible snapshotting.
  ``
  `SnapshotDeletionPolicy(IndexDeletionPolicy primary)`
  Sole constructor, taking the incoming `IndexDeletionPolicy` to wrap.