The IndexCommit type exposes the following members.

Constructors

  NameDescription
Protected methodIndexCommit
Initializes a new instance of the IndexCommit class

Methods

  NameDescription
Public methodDelete
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 {@link IndexDeletionPolicy} in effect and therefore this should only be called by its {@link IndexDeletionPolicy#onInit onInit()} or {@link IndexDeletionPolicy#onCommit onCommit()} methods.

Public methodEquals
Two IndexCommits are equal if both their Directory and versions are equal.
(Overrides Object..::..Equals(Object).)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetDirectory
Returns the {@link Directory} for the index.
Public methodGetFileNames
Returns all index files referenced by this commit point.
Public methodGetGeneration
Returns the generation (the _N in segments_N) for this IndexCommit
Public methodGetHashCode (Overrides Object..::..GetHashCode()()()().)
Public methodGetSegmentsFileName
Get the segments file (
CopyC#
segments_N
) associated with this commit point.
Public methodGetTimestamp
Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory().fileModified(getSegmentsFileName()).
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUserData
Returns userData, previously passed to {@link IndexWriter#Commit(Map)} for this commit. Map is String -> String.
Public methodGetVersion
Returns the version for this IndexCommit. This is the same value that {@link IndexReader#getVersion} would return if it were opened on this commit.
Public methodIsDeleted
Public methodIsOptimized
Returns true if this commit is an optimized index.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

See Also