Class IndexRevision
A IRevision of a single index files which comprises the list of files
that are part of the current Lucene.Net.Index.IndexCommit. To ensure the files are not
deleted by Lucene.Net.Index.IndexWriter for as long as this revision stays alive (i.e.
until Release(), the current commit point is snapshotted, using
Lucene.Net.Index.SnapshotDeletionPolicy (this means that the given writer's
IndexDeletionPolicy should return
Lucene.Net.Index.SnapshotDeletionPolicy).
When this revision is Release()d, it releases the obtained
snapshot as well as calls DeleteUnusedFiles() so that the
snapshotted files are deleted (if they are no longer needed).
Inheritance
System.Object
IndexRevision
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.Replicator.dll
Syntax
public class IndexRevision : IRevision, IComparable<IRevision>
Constructors
|
Improve this Doc
View Source
IndexRevision(IndexWriter)
Constructor over the given Lucene.Net.Index.IndexWriter. Uses the last
Lucene.Net.Index.IndexCommit found in the Lucene.Net.Store.Directory managed by the given
writer.
Declaration
public IndexRevision(IndexWriter writer)
Parameters
Type |
Name |
Description |
Lucene.Net.Index.IndexWriter |
writer |
|
Properties
|
Improve this Doc
View Source
SourceFiles
Declaration
public virtual IDictionary<string, IList<RevisionFile>> SourceFiles { get; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IList<RevisionFile>> |
|
|
Improve this Doc
View Source
Version
Declaration
public virtual string Version { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
CompareTo(IRevision)
Declaration
public virtual int CompareTo(IRevision other)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CompareTo(String)
Declaration
public virtual int CompareTo(string version)
Parameters
Type |
Name |
Description |
System.String |
version |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Open(String, String)
Declaration
public virtual Stream Open(string source, string fileName)
Parameters
Type |
Name |
Description |
System.String |
source |
|
System.String |
fileName |
|
Returns
Type |
Description |
System.IO.Stream |
|
|
Improve this Doc
View Source
Release()
Declaration
public virtual void Release()
|
Improve this Doc
View Source
RevisionFiles(IndexCommit)
Returns a singleton map of the revision files from the given Lucene.Net.Index.IndexCommit.
Declaration
public static IDictionary<string, IList<RevisionFile>> RevisionFiles(IndexCommit commit)
Parameters
Type |
Name |
Description |
Lucene.Net.Index.IndexCommit |
commit |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IList<RevisionFile>> |
|
|
Improve this Doc
View Source
RevisionVersion(IndexCommit)
Returns a string representation of a revision's version from the given
Lucene.Net.Index.IndexCommit
Declaration
public static string RevisionVersion(IndexCommit commit)
Parameters
Type |
Name |
Description |
Lucene.Net.Index.IndexCommit |
commit |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Implements
System.IComparable<T>