Uses of Class
org.apache.lucene.index.IndexCommit
-
Uses of IndexCommit in org.apache.lucene.index
Modifier and TypeFieldDescriptionprotected IndexCommit
LiveIndexWriterConfig.commit
IndexCommit
thatIndexWriter
is opened on.protected IndexCommit
SnapshotDeletionPolicy.lastCommit
Most recently committedIndexCommit
.Modifier and TypeFieldDescriptionprotected final Map<Long,
IndexCommit> SnapshotDeletionPolicy.indexCommits
Used to map gen to IndexCommit.Modifier and TypeMethodDescriptionabstract IndexCommit
DirectoryReader.getIndexCommit()
Expert: return the IndexCommit that this reader has opened.FilterDirectoryReader.getIndexCommit()
IndexWriterConfig.getIndexCommit()
LiveIndexWriterConfig.getIndexCommit()
Returns theIndexCommit
as specified inIndexWriterConfig.setIndexCommit(IndexCommit)
or the default,null
which specifies to open the latest index commit point.SnapshotDeletionPolicy.getIndexCommit
(long gen) Retrieve anIndexCommit
from its generation; returns null if this IndexCommit is not currently snapshottedStandardDirectoryReader.getIndexCommit()
PersistentSnapshotDeletionPolicy.snapshot()
Snapshots the last commit.SnapshotDeletionPolicy.snapshot()
Snapshots the last commit and returns it.Modifier and TypeMethodDescriptionSnapshotDeletionPolicy.getSnapshots()
Returns all IndexCommits held by at least one snapshot.static List<IndexCommit>
DirectoryReader.listCommits
(Directory dir) Returns all commit points that exist in the Directory.Modifier and TypeMethodDescriptionint
IndexCommit.compareTo
(IndexCommit commit) protected abstract DirectoryReader
DirectoryReader.doOpenIfChanged
(IndexCommit commit) Implement this method to supportDirectoryReader.openIfChanged(DirectoryReader,IndexCommit)
.protected final DirectoryReader
FilterDirectoryReader.doOpenIfChanged
(IndexCommit commit) protected DirectoryReader
StandardDirectoryReader.doOpenIfChanged
(IndexCommit commit) protected void
SnapshotDeletionPolicy.incRef
(IndexCommit ic) Increments the refCount for thisIndexCommit
.static DirectoryReader
DirectoryReader.open
(IndexCommit commit) Expert: returns an IndexReader reading the index in the givenIndexCommit
.static DirectoryReader
DirectoryReader.open
(IndexCommit commit, int minSupportedMajorVersion, Comparator<LeafReader> leafSorter) Expert: returns an IndexReader reading the index on the givenIndexCommit
.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.void
PersistentSnapshotDeletionPolicy.release
(IndexCommit commit) Deletes a snapshotted commit.void
SnapshotDeletionPolicy.release
(IndexCommit commit) Release a snapshotted commit.SegmentInfos.FindSegmentsFile.run
(IndexCommit commit) RunSegmentInfos.FindSegmentsFile.doBody(java.lang.String)
on the provided commit.IndexWriterConfig.setIndexCommit
(IndexCommit commit) Expert: allows to open a certain commit point.Modifier and TypeMethodDescriptionabstract void
IndexDeletionPolicy.onCommit
(List<? extends IndexCommit> commits) This is called each time the writer completed a commit.void
KeepOnlyLastCommitDeletionPolicy.onCommit
(List<? extends IndexCommit> commits) Deletes all commits except the most recent one.void
NoDeletionPolicy.onCommit
(List<? extends IndexCommit> commits) void
SnapshotDeletionPolicy.onCommit
(List<? extends IndexCommit> commits) abstract 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.void
KeepOnlyLastCommitDeletionPolicy.onInit
(List<? extends IndexCommit> commits) Deletes all commits except the most recent one.void
NoDeletionPolicy.onInit
(List<? extends IndexCommit> commits) void
SnapshotDeletionPolicy.onInit
(List<? extends IndexCommit> commits)