Class that will force an index writer to open an index based on the generation in the segments.gen file as opposed to the highest generation found in a directory listing.
More...
Inherits Lucene.Net.Index.IndexCommit.
|
| SegmentsGenCommit (Directory d) |
| Ctor.
|
|
override void | Delete () |
| Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy. Upon calling this, the writer is notified that this commit point should be deleted. Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its IndexDeletionPolicy.OnInit{T}(IList{T}) or IndexDeletionPolicy.OnCommit{T}(IList{T}) methods.
|
|
override bool | Equals (System.Object other) |
| Two IndexCommits are equal if both their Directory and versions are equal.
|
|
override int | GetHashCode () |
|
|
override string | SegmentsFileName [get] |
| Get the segments_n file for the generation found in the segments.gen file.
|
|
override long | Generation [get] |
|
override ICollection< string > | FileNames [get] |
|
override Directory | Directory [get] |
|
override bool | IsDeleted [get] |
|
override bool | IsOptimized [get] |
|
override long | Version [get] |
|
override IDictionary< string,
string > | UserData [get] |
|
abstract string | SegmentsFileName [get] |
| Get the segments file (segments_N ) associated with this commit point.
|
|
abstract ICollection< string > | FileNames [get] |
| Returns all index files referenced by this commit point.
|
|
abstract Directory | Directory [get] |
| Returns the Store.Directory for the index.
|
|
abstract bool | IsDeleted [get] |
|
abstract bool | IsOptimized [get] |
| Returns true if this commit is an optimized index.
|
|
abstract long | Version [get] |
| Returns the version for this IndexCommit. This is the same value that IndexReader.Version would return if it were opened on this commit.
|
|
abstract long | Generation [get] |
| Returns the generation (the _N in segments_N) for this IndexCommit
|
|
virtual long | Timestamp [get] |
| Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory().fileModified(getSegmentsFileName()).
|
|
abstract IDictionary< string,
string > | UserData [get] |
| Returns userData, previously passed to IndexWriter.Commit(System.Collections.Generic.IDictionary{string, string}) for this commit. IDictionary is String -> String.
|
|
Class that will force an index writer to open an index based on the generation in the segments.gen file as opposed to the highest generation found in a directory listing.
A use case for using this IndexCommit when opening an IndexWriter would be if index snapshots (source) are being copied over an existing index (target) and the source now has a lower generation than the target due to initiating a rebuild of the index.
Definition at line 37 of file SegmentsGenCommit.cs.
Lucene.Net.Index.SegmentsGenCommit.SegmentsGenCommit |
( |
Directory |
d | ) |
|
override void Lucene.Net.Index.SegmentsGenCommit.Delete |
( |
| ) |
|
|
virtual |
Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy. Upon calling this, the writer is notified that this commit point should be deleted. Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its IndexDeletionPolicy.OnInit{T}(IList{T}) or IndexDeletionPolicy.OnCommit{T}(IList{T}) methods.
Implements Lucene.Net.Index.IndexCommit.
Definition at line 128 of file SegmentsGenCommit.cs.
override Directory Lucene.Net.Index.SegmentsGenCommit.Directory |
|
get |
override ICollection<string> Lucene.Net.Index.SegmentsGenCommit.FileNames |
|
get |
override long Lucene.Net.Index.SegmentsGenCommit.Generation |
|
get |
override bool Lucene.Net.Index.SegmentsGenCommit.IsDeleted |
|
get |
override bool Lucene.Net.Index.SegmentsGenCommit.IsOptimized |
|
get |
override string Lucene.Net.Index.SegmentsGenCommit.SegmentsFileName |
|
get |
Get the segments_n file for the generation found in the segments.gen file.
- Returns
- The segments_n file to use.
Definition at line 65 of file SegmentsGenCommit.cs.
override IDictionary<string, string> Lucene.Net.Index.SegmentsGenCommit.UserData |
|
get |
override long Lucene.Net.Index.SegmentsGenCommit.Version |
|
get |
The documentation for this class was generated from the following file: