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 Description private static class
IndexFileDeleter.CommitPoint
Holds details for each commit point.private class
SnapshotDeletionPolicy.SnapshotCommitPoint
Wraps a providedIndexCommit
and prevents it from being deleted.(package private) static class
StandardDirectoryReader.ReaderCommit
Fields in org.apache.lucene.index declared as IndexCommit Modifier and Type Field Description protected IndexCommit
LiveIndexWriterConfig. commit
IndexCommit
thatIndexWriter
is opened on.protected IndexCommit
SnapshotDeletionPolicy.SnapshotCommitPoint. cp
TheIndexCommit
we are preventing from deletion.protected IndexCommit
SnapshotDeletionPolicy. lastCommit
Most recently committedIndexCommit
.Fields in org.apache.lucene.index with type parameters of type IndexCommit Modifier and Type Field Description protected java.util.Map<java.lang.Long,IndexCommit>
SnapshotDeletionPolicy. indexCommits
Used to map gen to IndexCommit.Methods in org.apache.lucene.index that return IndexCommit Modifier and Type Method Description abstract IndexCommit
DirectoryReader. getIndexCommit()
Expert: return the IndexCommit that this reader has opened.IndexCommit
FilterDirectoryReader. getIndexCommit()
IndexCommit
IndexWriterConfig. getIndexCommit()
IndexCommit
LiveIndexWriterConfig. getIndexCommit()
Returns theIndexCommit
as specified inIndexWriterConfig.setIndexCommit(IndexCommit)
or the default,null
which specifies to open the latest index commit point.IndexCommit
SnapshotDeletionPolicy. getIndexCommit(long gen)
Retrieve anIndexCommit
from its generation; returns null if this IndexCommit is not currently snapshottedIndexCommit
StandardDirectoryReader. getIndexCommit()
IndexCommit
PersistentSnapshotDeletionPolicy. snapshot()
Snapshots the last commit.IndexCommit
SnapshotDeletionPolicy. snapshot()
Snapshots the last commit and returns it.Methods in org.apache.lucene.index that return types with arguments of type IndexCommit Modifier and Type Method Description java.util.List<IndexCommit>
SnapshotDeletionPolicy. getSnapshots()
Returns all IndexCommits held by at least one snapshot.static java.util.List<IndexCommit>
DirectoryReader. listCommits(Directory dir)
Returns all commit points that exist in the Directory.private java.util.List<IndexCommit>
SnapshotDeletionPolicy. wrapCommits(java.util.List<? extends IndexCommit> commits)
Wraps eachIndexCommit
as aSnapshotDeletionPolicy.SnapshotCommitPoint
.Methods in org.apache.lucene.index with parameters of type IndexCommit Modifier and Type Method Description int
IndexCommit. compareTo(IndexCommit commit)
private DirectoryReader
StandardDirectoryReader. doOpenFromCommit(IndexCommit commit)
private DirectoryReader
StandardDirectoryReader. doOpenFromWriter(IndexCommit commit)
protected abstract DirectoryReader
DirectoryReader. doOpenIfChanged(IndexCommit commit)
Implement this method to supportDirectoryReader.openIfChanged(DirectoryReader,IndexCommit)
.protected DirectoryReader
FilterDirectoryReader. doOpenIfChanged(IndexCommit commit)
protected DirectoryReader
StandardDirectoryReader. doOpenIfChanged(IndexCommit commit)
private DirectoryReader
StandardDirectoryReader. doOpenNoWriter(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, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
Expert: returns an IndexReader reading the index in the givenIndexCommit
.(package private) static DirectoryReader
StandardDirectoryReader. open(Directory directory, IndexCommit commit, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
called from DirectoryReader.open(...) methodsstatic 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.T
SegmentInfos.FindSegmentsFile. run(IndexCommit commit)
RunSegmentInfos.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 Description abstract void
IndexDeletionPolicy. onCommit(java.util.List<? extends IndexCommit> commits)
This is called each time the writer completed a commit.void
KeepOnlyLastCommitDeletionPolicy. onCommit(java.util.List<? extends IndexCommit> commits)
Deletes all commits except the most recent one.void
NoDeletionPolicy. onCommit(java.util.List<? extends IndexCommit> commits)
void
SnapshotDeletionPolicy. onCommit(java.util.List<? extends IndexCommit> commits)
abstract void
IndexDeletionPolicy. onInit(java.util.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(java.util.List<? extends IndexCommit> commits)
Deletes all commits except the most recent one.void
NoDeletionPolicy. onInit(java.util.List<? extends IndexCommit> commits)
void
SnapshotDeletionPolicy. onInit(java.util.List<? extends IndexCommit> commits)
private java.util.List<IndexCommit>
SnapshotDeletionPolicy. wrapCommits(java.util.List<? extends IndexCommit> commits)
Wraps eachIndexCommit
as aSnapshotDeletionPolicy.SnapshotCommitPoint
.Constructors in org.apache.lucene.index with parameters of type IndexCommit Constructor Description SnapshotCommitPoint(IndexCommit cp)
Creates aSnapshotCommitPoint
wrapping the providedIndexCommit
.
-