Class IndexCommit
Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.
Changes to the content of an index are made visible
only after the writer who made that change commits by
writing a new segments file
(segments_N
). This point in time, when the
action of writing of a new segments file to the directory
is completed, is an index commit.
Each index commit point has a unique segments file associated with it. The segments file associated with a later index commit point would have a larger N.
@lucene.experimental
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class IndexCommit : IComparable<IndexCommit>
Constructors
Name | Description |
---|---|
IndexCommit() | Sole constructor. (For invocation by subclass constructors, typically implicit.) |
Properties
Name | Description |
---|---|
Directory | Returns the Directory for the index. |
FileNames | Returns all index files referenced by this commit point. |
Generation | Returns the generation (the _N in segments_N) for this IndexCommit |
IsDeleted | Returns |
SegmentCount | Returns number of segments referenced by this commit. |
SegmentsFileName | Get the segments file ( |
UserData | Returns userData, previously passed to
SetCommitData(IDictionary<String, String>)} for this commit. |
Methods
Name | Description |
---|---|
CompareTo(IndexCommit) | |
Delete() | Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy. Upon calling this, the writer is notified that this commit point should be deleted. Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its OnInit<T>(IList<T>) or OnCommit<T>(IList<T>) methods. |
Equals(Object) | Two IndexCommits are equal if both their Directory and versions are equal. |
GetHashCode() |