Property Version
Version
Version number when this IndexReader was opened. Not implemented in the IndexReader base class.
If this reader is based on a Directory (ie, was created by calling Open(Directory, Boolean), or Reopen() on a reader based on a Directory), then this method returns the version recorded in the commit that the reader opened. This version is advanced every time Commit() is called.
If instead this reader is a near real-time reader (ie, obtained by a call to GetReader(), or by calling Reopen() on a near real-time reader), then this method returns the version of the last commit done by the writer. Note that even as further changes are made with the writer, the version will not changed until a commit is completed. Thus, you should not rely on this method to determine when a near real-time reader should be opened. Use IsCurrent() instead.
Declaration
public virtual long Version { get; }
Property Value
Type | Description |
---|---|
System.Int64 |