Table of Contents

Public classSealed KeepLastNCommitsPolicy

Namespace
Rowles.LeanLucene.Index.Indexer
Assembly
Rowles.LeanLucene.dll

Keeps the last N commit generations, deleting older ones.

public sealed class KeepLastNCommitsPolicy : IIndexDeletionPolicy
KeepLastNCommitsPolicy
Implements

Constructors

Public constructor KeepLastNCommitsPolicy(int)

Initialises a new policy that retains the last maxCommits commit generations.

Methods

Public method OnCommit(string, int)

Called after a new commit is written. The implementation should delete any commit files (and their segments) that are no longer needed.

Public method OnCommit(string, int, IReadOnlySet<string>)

Called after a new commit is written, with the set of segment IDs protected by held snapshots.