Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | Properties | List of all members
Lucene.Net.Index.IndexCommit Class Referenceabstract

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.
 

Detailed Description

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.

Member Function Documentation

abstract void Lucene.Net.Index.IndexCommit.Delete ( )
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.

Property Documentation

abstract Directory Lucene.Net.Index.IndexCommit.Directory
get

Returns the Store.Directory for the index.

Definition at line 55 of file IndexCommit.cs.

abstract ICollection<string> Lucene.Net.Index.IndexCommit.FileNames
get

Returns all index files referenced by this commit point.

Definition at line 52 of file IndexCommit.cs.

abstract long Lucene.Net.Index.IndexCommit.Generation
get

Returns the generation (the _N in segments_N) for this IndexCommit

Definition at line 101 of file IndexCommit.cs.

abstract bool Lucene.Net.Index.IndexCommit.IsDeleted
get

Definition at line 70 of file IndexCommit.cs.

abstract bool Lucene.Net.Index.IndexCommit.IsOptimized
get

Returns true if this commit is an optimized index.

Definition at line 73 of file IndexCommit.cs.

abstract string Lucene.Net.Index.IndexCommit.SegmentsFileName
get

Get the segments file (segments_N) associated with this commit point.

Definition at line 49 of file IndexCommit.cs.

virtual long Lucene.Net.Index.IndexCommit.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()).

Definition at line 109 of file IndexCommit.cs.

abstract IDictionary<string, string> Lucene.Net.Index.IndexCommit.UserData
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.

abstract long Lucene.Net.Index.IndexCommit.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.

Definition at line 96 of file IndexCommit.cs.


The documentation for this class was generated from the following file: