Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class IndexAndTaxonomyRevision

    A IRevision of a single index and taxonomy index files which comprises the list of files from both indexes. This revision should be used whenever a pair of search and taxonomy indexes need to be replicated together to guarantee consistency of both on the replicating (client) side.

    Inheritance
    object
    IndexAndTaxonomyRevision
    Implements
    IRevision
    IComparable<IRevision>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Replicator
    Assembly: Lucene.Net.Replicator.dll
    Syntax
    public class IndexAndTaxonomyRevision : IRevision, IComparable<IRevision>
    Remarks

    Note

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

    Constructors

    IndexAndTaxonomyRevision(IndexWriter, SnapshotDirectoryTaxonomyIndexWriterFactory)

    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 IndexAndTaxonomyRevision(IndexWriter indexWriter, SnapshotDirectoryTaxonomyIndexWriterFactory taxonomyWriterFactory)
    Parameters
    Type Name Description
    IndexWriter indexWriter
    SnapshotDirectoryTaxonomyIndexWriterFactory taxonomyWriterFactory
    Remarks

    Note

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

    Exceptions
    Type Condition
    InvalidOperationException

    If this index does not have any commits yet.

    ArgumentException

    If the Lucene.Net.Index.IndexWriterConfig.IndexDeletionPolicy is not a Lucene.Net.Index.SnapshotDeletionPolicy.

    See Also
    IndexRevision

    Fields

    INDEX_SOURCE

    A IRevision of a single index and taxonomy index files which comprises the list of files from both indexes. This revision should be used whenever a pair of search and taxonomy indexes need to be replicated together to guarantee consistency of both on the replicating (client) side.

    Declaration
    public const string INDEX_SOURCE = "index"
    Field Value
    Type Description
    string
    Remarks

    Note

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

    See Also
    IndexRevision

    TAXONOMY_SOURCE

    A IRevision of a single index and taxonomy index files which comprises the list of files from both indexes. This revision should be used whenever a pair of search and taxonomy indexes need to be replicated together to guarantee consistency of both on the replicating (client) side.

    Declaration
    public const string TAXONOMY_SOURCE = "taxonomy"
    Field Value
    Type Description
    string
    Remarks

    Note

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

    See Also
    IndexRevision

    Properties

    SourceFiles

    Returns the files that comprise this revision, as a mapping from a source to a list of files.

    Declaration
    public virtual IDictionary<string, IList<RevisionFile>> SourceFiles { get; }
    Property Value
    Type Description
    IDictionary<string, IList<RevisionFile>>
    Remarks

    Note

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

    See Also
    IndexRevision

    Version

    Returns a string representation of the version of this revision. The version is used by CompareTo(string) as well as to serialize/deserialize revision information. Therefore it must be self descriptive as well as be able to identify one revision from another.

    Declaration
    public virtual string Version { get; }
    Property Value
    Type Description
    string
    Remarks

    Note

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

    See Also
    IndexRevision

    Methods

    CompareTo(IRevision)

    Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

    Declaration
    public virtual int CompareTo(IRevision other)
    Parameters
    Type Name Description
    IRevision other

    An object to compare with this instance.

    Returns
    Type Description
    int

    A value that indicates the relative order of the objects being compared. The return value has these meanings:

    Value Meaning
    Less than zero This instance precedes other in the sort order.
    Zero This instance occurs in the same position in the sort order as other.
    Greater than zero This instance follows other in the sort order.
    Remarks

    Note

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

    See Also
    IndexRevision

    CompareTo(string)

    Compares this IndexAndTaxonomyRevision to the given version.

    Declaration
    public virtual int CompareTo(string version)
    Parameters
    Type Name Description
    string version
    Returns
    Type Description
    int
    Remarks

    Note

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

    See Also
    IndexRevision

    Open(string, string)

    A IRevision of a single index and taxonomy index files which comprises the list of files from both indexes. This revision should be used whenever a pair of search and taxonomy indexes need to be replicated together to guarantee consistency of both on the replicating (client) side.

    Declaration
    public virtual Stream Open(string source, string fileName)
    Parameters
    Type Name Description
    string source
    string fileName
    Returns
    Type Description
    Stream
    Remarks

    Note

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

    Exceptions
    Type Condition
    IOException

    An IO exception occurred.

    See Also
    IndexRevision

    Release()

    A IRevision of a single index and taxonomy index files which comprises the list of files from both indexes. This revision should be used whenever a pair of search and taxonomy indexes need to be replicated together to guarantee consistency of both on the replicating (client) side.

    Declaration
    public virtual void Release()
    Remarks

    Note

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

    Exceptions
    Type Condition
    IOException

    An IO exception occurred.

    See Also
    IndexRevision

    RevisionFiles(IndexCommit, IndexCommit)

    Returns a map of the revision files from the given Lucene.Net.Index.IndexCommits of the search and taxonomy indexes.

    Declaration
    public static IDictionary<string, IList<RevisionFile>> RevisionFiles(IndexCommit indexCommit, IndexCommit taxonomyCommit)
    Parameters
    Type Name Description
    IndexCommit indexCommit
    IndexCommit taxonomyCommit
    Returns
    Type Description
    IDictionary<string, IList<RevisionFile>>
    Remarks

    Note

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

    See Also
    IndexRevision

    RevisionVersion(IndexCommit, IndexCommit)

    Returns a string representation of a revision's version from the given Lucene.Net.Index.IndexCommits of the search and taxonomy indexes.

    Declaration
    public static string RevisionVersion(IndexCommit indexCommit, IndexCommit taxonomyCommit)
    Parameters
    Type Name Description
    IndexCommit indexCommit
    IndexCommit taxonomyCommit
    Returns
    Type Description
    string

    a string representation of a revision's version from the given Lucene.Net.Index.IndexCommits of the search and taxonomy indexes.

    Remarks

    Note

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

    See Also
    IndexRevision

    Implements

    IRevision
    IComparable<T>

    See Also

    IndexRevision
    Back to top Copyright © 2024 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.