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

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

### Uses of IndexCommit in org.apache.lucene.index

Subclasses of IndexCommit in org.apache.lucene.index
Modifier and Type | Class and Description
--- | ---
`protected class` | `SnapshotDeletionPolicy.SnapshotCommitPoint` Wraps a provided `IndexCommit` and prevents it from being deleted.

Fields in org.apache.lucene.index declared as IndexCommit
Modifier and Type | Field and Description
--- | ---
`protected IndexCommit` | LiveIndexWriterConfig.`commit` `IndexCommit` that `IndexWriter` is opened on.
`protected IndexCommit` | SnapshotDeletionPolicy.SnapshotCommitPoint.`cp` The `IndexCommit` we are preventing from deletion.
`protected IndexCommit` | SnapshotDeletionPolicy.`lastCommit` Most recently committed `IndexCommit`.

Methods in org.apache.lucene.index that return IndexCommit
Modifier and Type | Method and Description
--- | ---
`IndexCommit` | LiveIndexWriterConfig.`getIndexCommit()` Returns the `IndexCommit` as specified in `IndexWriterConfig.setIndexCommit(IndexCommit)` or the default, `null` which specifies to open the latest index commit point.
`IndexCommit` | IndexWriterConfig.`getIndexCommit()`
`abstract IndexCommit` | DirectoryReader.`getIndexCommit()` Expert: return the IndexCommit that this reader has opened.
`IndexCommit` | SnapshotDeletionPolicy.`getSnapshot(String id)` Get a snapshotted IndexCommit by ID.
`IndexCommit` | SnapshotDeletionPolicy.`snapshot(String id)` Snapshots the last commit.
`IndexCommit` | PersistentSnapshotDeletionPolicy.`snapshot(String id)` Snapshots the last commit using the given ID.

Methods in org.apache.lucene.index that return types with arguments of type IndexCommit
Modifier and Type | Method and Description
--- | ---
`static List<IndexCommit>` | DirectoryReader.`listCommits(Directory dir)` Returns all commit points that exist in the Directory.
`protected List<IndexCommit>` | SnapshotDeletionPolicy.`wrapCommits(List<? extends IndexCommit> commits)` Wraps each `IndexCommit` as a `SnapshotDeletionPolicy.SnapshotCommitPoint`.

Methods in org.apache.lucene.index with parameters of type IndexCommit
Modifier and Type | Method and Description
--- | ---
`int` | IndexCommit.`compareTo(IndexCommit commit)`
`protected abstract DirectoryReader` | DirectoryReader.`doOpenIfChanged(IndexCommit commit)` Implement this method to support `DirectoryReader.openIfChanged(DirectoryReader,IndexCommit)`.
`static DirectoryReader` | IndexReader.`open(IndexCommit commit)` Deprecated. Use `DirectoryReader.open(IndexCommit)`
`static DirectoryReader` | DirectoryReader.`open(IndexCommit commit)` Expert: returns an IndexReader reading the index in the given `IndexCommit`.
`static DirectoryReader` | IndexReader.`open(IndexCommit commit, int termInfosIndexDivisor)` Deprecated. Use `DirectoryReader.open(IndexCommit,int)`
`static DirectoryReader` | DirectoryReader.`open(IndexCommit commit, int termInfosIndexDivisor)` Expert: returns an IndexReader reading the index in the given `IndexCommit` and termInfosIndexDivisor.
`static DirectoryReader` | DirectoryReader.`openIfChanged(DirectoryReader oldReader, IndexCommit commit)` If the IndexCommit differs from what the provided reader is searching, open and return a new reader; else, return null.
`protected void` | SnapshotDeletionPolicy.`registerSnapshotInfo(String id, String segment, IndexCommit commit)` Registers the given snapshot information.
`Object` | SegmentInfos.FindSegmentsFile.`run(IndexCommit commit)` Run `SegmentInfos.FindSegmentsFile.doBody(java.lang.String)` on the provided commit.
`IndexWriterConfig` | IndexWriterConfig.`setIndexCommit(IndexCommit commit)` Expert: allows to open a certain commit point.

Method parameters in org.apache.lucene.index with type arguments of type IndexCommit
Modifier and Type | Method and Description
--- | ---
`void` | SnapshotDeletionPolicy.`onCommit(List<? extends IndexCommit> commits)`
`void` | NoDeletionPolicy.`onCommit(List<? extends IndexCommit> commits)`
`void` | KeepOnlyLastCommitDeletionPolicy.`onCommit(List<? extends IndexCommit> commits)` Deletes all commits except the most recent one.
`void` | IndexDeletionPolicy.`onCommit(List<? extends IndexCommit> commits)` This is called each time the writer completed a commit.
`void` | SnapshotDeletionPolicy.`onInit(List<? extends IndexCommit> commits)`
`void` | PersistentSnapshotDeletionPolicy.`onInit(List<? extends IndexCommit> commits)`
`void` | NoDeletionPolicy.`onInit(List<? extends IndexCommit> commits)`
`void` | KeepOnlyLastCommitDeletionPolicy.`onInit(List<? extends IndexCommit> commits)` Deletes all commits except the most recent one.
`void` | IndexDeletionPolicy.`onInit(List<? extends IndexCommit> commits)` This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.
`protected List<IndexCommit>` | SnapshotDeletionPolicy.`wrapCommits(List<? extends IndexCommit> commits)` Wraps each `IndexCommit` as a `SnapshotDeletionPolicy.SnapshotCommitPoint`.

Constructors in org.apache.lucene.index with parameters of type IndexCommit
Constructor and Description
`SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit cp)` Creates a `SnapshotCommitPoint` wrapping the provided `IndexCommit`.