IndexCommit

abstract class IndexCommit : Comparable<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.

Properties

Link copied to clipboard
abstract val directory: Directory

Returns the Directory for the index.

Link copied to clipboard
Link copied to clipboard
abstract val generation: Long

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

Link copied to clipboard
abstract val isDeleted: Boolean

Returns true if this commit should be deleted; this is only used by IndexWriter after invoking the IndexDeletionPolicy.

Link copied to clipboard
Link copied to clipboard
abstract val segmentCount: Int

Returns number of segments referenced by this commit.

Link copied to clipboard
abstract val segmentsFileName: String?

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

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun compareTo(commit: IndexCommit?): Int
Link copied to clipboard
abstract fun delete()

Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Two IndexCommits are equal if both their Directory and versions are equal.

Link copied to clipboard
open override fun hashCode(): Int