Method Snapshot
Snapshot()
Snapshots the last commit and returns it. Once a commit is 'snapshotted,' it is protected from deletion (as long as this IndexDeletionPolicy is used). The snapshot can be removed by calling Release(IndexCommit) followed by a call to DeleteUnusedFiles().
NOTE: while the snapshot is held, the files it references will not be deleted, which will consume additional disk space in your index. If you take a snapshot at a particularly bad time (say just before you call ForceMerge(Int32)) then in the worst case this could consume an extra 1X of your total index size, until you release the snapshot.
Declaration
public virtual IndexCommit Snapshot()
Returns
Type | Description |
---|---|
IndexCommit | the IndexCommit that was snapshotted. |