Package | Description |
---|---|
org.apache.lucene.index |
Code to maintain and access indices.
|
Modifier and Type | Class and Description |
---|---|
private static class |
IndexFileDeleter.CommitPoint
Holds details for each commit point.
|
private class |
SnapshotDeletionPolicy.SnapshotCommitPoint
Wraps a provided
IndexCommit and prevents it
from being deleted. |
(package private) static class |
StandardDirectoryReader.ReaderCommit |
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 . |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Long,IndexCommit> |
SnapshotDeletionPolicy.indexCommits
Used to map gen to 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 |
StandardDirectoryReader.getIndexCommit() |
IndexCommit |
IndexWriterConfig.getIndexCommit() |
IndexCommit |
FilterDirectoryReader.getIndexCommit() |
abstract IndexCommit |
DirectoryReader.getIndexCommit()
Expert: return the IndexCommit that this reader has opened.
|
IndexCommit |
SnapshotDeletionPolicy.getIndexCommit(long gen)
Retrieve an
IndexCommit from its generation;
returns null if this IndexCommit is not currently
snapshotted |
IndexCommit |
PersistentSnapshotDeletionPolicy.snapshot()
Snapshots the last commit.
|
IndexCommit |
SnapshotDeletionPolicy.snapshot()
Snapshots the last commit and returns it.
|
Modifier and Type | Method and 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 each
IndexCommit as a SnapshotDeletionPolicy.SnapshotCommitPoint . |
Modifier and Type | Method and Description |
---|---|
int |
IndexCommit.compareTo(IndexCommit commit) |
private DirectoryReader |
StandardDirectoryReader.doOpenFromCommit(IndexCommit commit) |
private DirectoryReader |
StandardDirectoryReader.doOpenFromWriter(IndexCommit commit) |
protected DirectoryReader |
StandardDirectoryReader.doOpenIfChanged(IndexCommit commit) |
protected DirectoryReader |
FilterDirectoryReader.doOpenIfChanged(IndexCommit commit) |
protected abstract DirectoryReader |
DirectoryReader.doOpenIfChanged(IndexCommit commit)
Implement this method to support
DirectoryReader.openIfChanged(DirectoryReader,IndexCommit) . |
private DirectoryReader |
StandardDirectoryReader.doOpenNoWriter(IndexCommit commit) |
protected void |
SnapshotDeletionPolicy.incRef(IndexCommit ic)
Increments the refCount for this
IndexCommit . |
(package private) static DirectoryReader |
StandardDirectoryReader.open(Directory directory,
IndexCommit commit,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
called from DirectoryReader.open(...) methods
|
static DirectoryReader |
DirectoryReader.open(IndexCommit commit)
Expert: returns an IndexReader reading the index in the given
IndexCommit . |
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 given
IndexCommit . |
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.
|
T |
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
abstract void |
IndexDeletionPolicy.onCommit(java.util.List<? extends IndexCommit> commits)
This is called each time the writer completed a commit.
|
void |
SnapshotDeletionPolicy.onCommit(java.util.List<? extends IndexCommit> commits) |
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) |
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 |
SnapshotDeletionPolicy.onInit(java.util.List<? extends IndexCommit> commits) |
private java.util.List<IndexCommit> |
SnapshotDeletionPolicy.wrapCommits(java.util.List<? extends IndexCommit> commits)
Wraps each
IndexCommit as a SnapshotDeletionPolicy.SnapshotCommitPoint . |
Constructor and Description |
---|
SnapshotCommitPoint(IndexCommit cp)
Creates a
SnapshotCommitPoint wrapping the provided
IndexCommit . |