Show / Hide Table of Contents

    Class IndexRevision

    A IRevision of a single index files which comprises the list of files that are part of the current IndexCommit. To ensure the files are not deleted by IndexWriter for as long as this revision stays alive (i.e. until Release(), the current commit point is snapshotted, using SnapshotDeletionPolicy (this means that the given writer's IndexDeletionPolicy should return 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
    Implements
    IRevision
    IComparable<IRevision>
    Namespace: Lucene.Net.Replicator
    Assembly: Lucene.Net.Replicator.dll
    Syntax
    public class IndexRevision : object, IRevision, IComparable<IRevision>
    Remarks
    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    Constructors

    | Improve this Doc View Source

    IndexRevision(IndexWriter)

    Constructor over the given IndexWriter. Uses the last IndexCommit found in the Directory managed by the given writer.

    Declaration
    public IndexRevision(IndexWriter writer)
    Parameters
    Type Name Description
    IndexWriter writer

    Properties

    | Improve this Doc View Source

    SourceFiles

    Declaration
    public virtual IDictionary<string, IList<RevisionFile>> SourceFiles { get; }
    Property Value
    Type Description
    IDictionary<System.String, 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
    Type Name Description
    IRevision other
    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
    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 IndexCommit.

    Declaration
    public static IDictionary<string, IList<RevisionFile>> RevisionFiles(IndexCommit commit)
    Parameters
    Type Name Description
    IndexCommit commit
    Returns
    Type Description
    IDictionary<System.String, IList<RevisionFile>>
    | Improve this Doc View Source

    RevisionVersion(IndexCommit)

    Returns a string representation of a revision's version from the given IndexCommit

    Declaration
    public static string RevisionVersion(IndexCommit commit)
    Parameters
    Type Name Description
    IndexCommit commit
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Implements

    IRevision
    IComparable<>
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)