Returns all commit points that exist in the Directory. Normally, because the default is {@link KeepOnlyLastCommitDeletionPolicy}, there would be only one commit point. But if you're using a custom {@link IndexDeletionPolicy} then there could be many commits. Once you have a given commit, you can open a reader on it by calling {@link IndexReader#Open(IndexCommit)} There must be at least one commit in the Directory, else this method throws {@link java.io.IOException}. Note that if a commit is in progress while this method is running, that commit may or may not be returned array.

Namespace: Lucene.Net.Index
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static ICollection ListCommits(
	Directory dir
)
Visual Basic
Public Shared Function ListCommits ( _
	dir As Directory _
) As ICollection
Visual C++
public:
static ICollection^ ListCommits(
	Directory^ dir
)

Parameters

dir
Type: Lucene.Net.Store..::..Directory

[Missing <param name="dir"/> documentation for "M:Lucene.Net.Index.IndexReader.ListCommits(Lucene.Net.Store.Directory)"]

Return Value

[Missing <returns> documentation for "M:Lucene.Net.Index.IndexReader.ListCommits(Lucene.Net.Store.Directory)"]

See Also