Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class IndexAndTaxonomyReplicationHandler

    A IReplicationHandler for replication of an index and taxonomy pair. See IReplicationHandler for more detail. This handler ensures that the search and taxonomy indexes are replicated in a consistent way.

    Inheritance
    object
    IndexAndTaxonomyReplicationHandler
    Implements
    IReplicationHandler
    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 IndexAndTaxonomyReplicationHandler : IReplicationHandler
    Remarks

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    Constructors

    IndexAndTaxonomyReplicationHandler(Directory, Directory, Action)

    Constructor with the given index directory and callback to notify when the indexes were updated.

    Declaration
    public IndexAndTaxonomyReplicationHandler(Directory indexDirectory, Directory taxonomyDirectory, Action callback)
    Parameters
    Type Name Description
    Directory indexDirectory
    Directory taxonomyDirectory
    Action callback
    Remarks

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    Exceptions
    Type Condition
    IOException
    See Also
    IndexReplicationHandler

    Fields

    INFO_STREAM_COMPONENT

    The component used to log messages to the Lucene.Net.Util.InfoStream.DefaultLucene.Net.Util.InfoStream.

    Declaration
    public const string INFO_STREAM_COMPONENT = "IndexAndTaxonomyReplicationHandler"
    Field Value
    Type Description
    string
    Remarks

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    See Also
    IndexReplicationHandler

    Properties

    CurrentRevisionFiles

    Returns the current revision version held by the handler.

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

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    See Also
    IndexReplicationHandler

    CurrentVersion

    Returns the current revision files held by the handler.

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

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    See Also
    IndexReplicationHandler

    InfoStream

    Gets or sets the Lucene.Net.Util.InfoStream to use for logging messages.

    Declaration
    public virtual InfoStream InfoStream { get; set; }
    Property Value
    Type Description
    InfoStream
    Remarks

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    See Also
    IndexReplicationHandler

    Methods

    RevisionReady(string, IDictionary<string, IList<RevisionFile>>, IDictionary<string, IList<string>>, IDictionary<string, Directory>)

    Called when a new revision was obtained and is available (i.e. all needed files were successfully copied).

    Declaration
    public virtual void RevisionReady(string version, IDictionary<string, IList<RevisionFile>> revisionFiles, IDictionary<string, IList<string>> copiedFiles, IDictionary<string, Directory> sourceDirectory)
    Parameters
    Type Name Description
    string version

    The version of the IRevision that was copied

    IDictionary<string, IList<RevisionFile>> revisionFiles

    The files contained by this IRevision

    IDictionary<string, IList<string>> copiedFiles

    The files that were actually copied

    IDictionary<string, Directory> sourceDirectory

    A mapping from a source of files to the Lucene.Net.Store.Directory they were copied into

    Remarks

    NOTE: If you intend to recreate a taxonomy index, you should make sure to reopen an IndexSearcher and TaxonomyReader pair via the provided callback, to guarantee that both indexes are in sync. This handler does not prevent replicating such index and taxonomy pairs, and if they are reopened by a different thread, unexpected errors can occur, as well as inconsistency between the taxonomy and index readers.

    Note

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

    Exceptions
    Type Condition
    IOException
    See Also
    IndexReplicationHandler

    Implements

    IReplicationHandler

    See Also

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