Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader. More...
Inherited by Lucene.Net.Index.DirectoryReader.ReaderCommit, Lucene.Net.Index.IndexFileDeleter.CommitPoint, Lucene.Net.Index.SegmentsGenCommit, and Lucene.Net.Index.SnapshotDeletionPolicy.MyCommitPoint.
Public Member Functions | |
abstract void | 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 IndexDeletionPolicy.OnInit{T}(IList{T}) or IndexDeletionPolicy.OnCommit{T}(IList{T}) methods. | |
override bool | Equals (System.Object other) |
Two IndexCommits are equal if both their Directory and versions are equal. | |
override int | GetHashCode () |
Properties | |
abstract string | SegmentsFileName [get] |
Get the segments file (segments_N ) associated with this commit point. | |
abstract ICollection< string > | FileNames [get] |
Returns all index files referenced by this commit point. | |
abstract Directory | Directory [get] |
Returns the Store.Directory for the index. | |
abstract bool | IsDeleted [get] |
abstract bool | IsOptimized [get] |
Returns true if this commit is an optimized index. | |
abstract long | Version [get] |
Returns the version for this IndexCommit. This is the same value that IndexReader.Version would return if it were opened on this commit. | |
abstract long | Generation [get] |
Returns the generation (the _N in segments_N) for this IndexCommit | |
virtual long | Timestamp [get] |
Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory().fileModified(getSegmentsFileName()). | |
abstract IDictionary< string, string > | UserData [get] |
Returns userData, previously passed to IndexWriter.Commit(System.Collections.Generic.IDictionary{string, string}) for this commit. IDictionary is String -> String. | |
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.
WARNING: This API is a new and experimental and may suddenly change.
Definition at line 44 of file IndexCommit.cs.
|
pure virtual |
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 IndexDeletionPolicy.OnInit{T}(IList{T}) or IndexDeletionPolicy.OnCommit{T}(IList{T}) methods.
Implemented in Lucene.Net.Index.SegmentsGenCommit.
override bool Lucene.Net.Index.IndexCommit.Equals | ( | System.Object | other | ) |
Two IndexCommits are equal if both their Directory and versions are equal.
Definition at line 76 of file IndexCommit.cs.
override int Lucene.Net.Index.IndexCommit.GetHashCode | ( | ) |
Definition at line 87 of file IndexCommit.cs.
|
get |
Returns the Store.Directory for the index.
Definition at line 55 of file IndexCommit.cs.
|
get |
Returns all index files referenced by this commit point.
Definition at line 52 of file IndexCommit.cs.
|
get |
Returns the generation (the _N in segments_N) for this IndexCommit
Definition at line 101 of file IndexCommit.cs.
|
get |
Definition at line 70 of file IndexCommit.cs.
|
get |
Returns true if this commit is an optimized index.
Definition at line 73 of file IndexCommit.cs.
|
get |
Get the segments file (segments_N
) associated with this commit point.
Definition at line 49 of file IndexCommit.cs.
|
get |
Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory().fileModified(getSegmentsFileName()).
Definition at line 109 of file IndexCommit.cs.
|
get |
Returns userData, previously passed to IndexWriter.Commit(System.Collections.Generic.IDictionary{string, string}) for this commit. IDictionary is String -> String.
Definition at line 117 of file IndexCommit.cs.
|
get |
Returns the version for this IndexCommit. This is the same value that IndexReader.Version would return if it were opened on this commit.
Definition at line 96 of file IndexCommit.cs.