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.
Inherited Members
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
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
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
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
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
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:
|
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
See Also
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
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
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
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
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.