Fork me on GitHub
  • API

    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 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
    Implements
    IRevision
    System.IComparable<IRevision>
    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)
    Namespace: Lucene.Net.Replicator
    Assembly: Lucene.Net.Replicator.dll
    Syntax
    public class IndexRevision : IRevision, IComparable<IRevision>
    Remarks
    Note

    This API is experimental and might change in incompatible ways in the next release.

    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
    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
    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

    IRevision
    System.IComparable<T>
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.