
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
KeepLastNCommitsPolicy(int)
Initialises a new policy that retains the last
maxCommitscommit generations.
Methods
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.
OnCommit(string, int, IReadOnlySet<string>)
Called after a new commit is written, with the set of segment IDs protected by held snapshots.