Class SnapshotDirectoryTaxonomyIndexWriterFactory
An implementation of Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyIndexWriterFactory which sets the underlying Lucene.Net.Index.IndexWriter's Lucene.Net.Index.IndexDeletionPolicy to Lucene.Net.Index.SnapshotDeletionPolicy.
Inherited Members
Namespace: Lucene.Net.Replicator
Assembly: Lucene.Net.Replicator.dll
Syntax
public class SnapshotDirectoryTaxonomyIndexWriterFactory : DirectoryTaxonomyIndexWriterFactory
Properties
DeletionPolicy
Gets the Lucene.Net.Index.SnapshotDeletionPolicy used by the underlying Lucene.Net.Index.IndexWriter.
Declaration
public virtual SnapshotDeletionPolicy DeletionPolicy { get; }
Property Value
| Type | Description |
|---|---|
| SnapshotDeletionPolicy |
IndexWriter
Gets the Lucene.Net.Index.IndexWriter that was opened by Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter that is using this factory class.
Declaration
public virtual IndexWriter IndexWriter { get; }
Property Value
| Type | Description |
|---|---|
| IndexWriter |
Methods
CreateIndexWriterConfig(OpenMode)
Creates a new Lucene.Net.Index.IndexWriterConfig using Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyIndexWriterFactory.CreateIndexWriterConfig(Lucene.Net.Index.OpenMode) and sets IndexDeletionPolicy to Lucene.Net.Index.SnapshotDeletionPolicy.
Declaration
public override IndexWriterConfig CreateIndexWriterConfig(OpenMode openMode)
Parameters
| Type | Name | Description |
|---|---|---|
| OpenMode | openMode |
Returns
| Type | Description |
|---|---|
| IndexWriterConfig |
Overrides
OpenIndexWriter(Directory, IndexWriterConfig)
Open internal index writer, which contains the taxonomy data.
Extensions may provide their own Lucene.Net.Index.IndexWriter implementation or instance. NOTE: the instance this method returns will be disposed upon calling to Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Dispose(). NOTE: the merge policy in effect must not merge none adjacent segments. See comment in Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyIndexWriterFactory.CreateIndexWriterConfig(Lucene.Net.Index.OpenMode) for the logic behind this.Declaration
public override IndexWriter OpenIndexWriter(Directory directory, IndexWriterConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| Directory | directory | the Lucene.Net.Store.Directory on top of which an Lucene.Net.Index.IndexWriter should be opened. |
| IndexWriterConfig | config | configuration for the internal index writer. |
Returns
| Type | Description |
|---|---|
| IndexWriter |