Class KeepOnlyLastCommitDeletionPolicy
This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done. This is the default deletion policy.
Inherited Members
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public sealed class KeepOnlyLastCommitDeletionPolicy : IndexDeletionPolicy
Constructors
KeepOnlyLastCommitDeletionPolicy()
Sole constructor.
Declaration
public KeepOnlyLastCommitDeletionPolicy()
Methods
OnCommit<T>(IList<T>)
Deletes all commits except the most recent one.
Declaration
public override void OnCommit<T>(IList<T> commits) where T : IndexCommit
Parameters
Type | Name | Description |
---|---|---|
IList<T> | commits |
Type Parameters
Name | Description |
---|---|
T |
Overrides
OnInit<T>(IList<T>)
Deletes all commits except the most recent one.
Declaration
public override void OnInit<T>(IList<T> commits) where T : IndexCommit
Parameters
Type | Name | Description |
---|---|---|
IList<T> | commits |
Type Parameters
Name | Description |
---|---|
T |