Table of Contents

Class GenericDirectoryFactory

Namespace
Examine.Lucene.Directories
Assembly
Examine.Lucene.dll

Represents a generic directory factory

public class GenericDirectoryFactory : IDirectoryFactory, ITaxonomyDirectoryFactory
Inheritance
GenericDirectoryFactory
Implements
Inherited Members

Constructors

GenericDirectoryFactory(Func<string, Directory>)

Creates an instance of GenericDirectoryFactory

public GenericDirectoryFactory(Func<string, Directory> factory)

Parameters

factory Func<string, Directory>

GenericDirectoryFactory(Func<string, Directory>, Func<string, Directory?>?)

Creates an instance of GenericDirectoryFactory

public GenericDirectoryFactory(Func<string, Directory> factory, Func<string, Directory?>? taxonomyDirectoryFactory)

Parameters

factory Func<string, Directory>
taxonomyDirectoryFactory Func<string, Directory>

Methods

CreateDirectory(LuceneIndex, bool)

Creates the directory instance

public Directory CreateDirectory(LuceneIndex luceneIndex, bool forceUnlock)

Parameters

luceneIndex LuceneIndex
forceUnlock bool

If true, will force unlock the directory when created

Returns

Directory

Remarks

Any subsequent calls for the same index will return the same directory instance

CreateTaxonomyDirectory(LuceneIndex, bool)

Creates the directory instance for the Taxonomy Index

public Directory? CreateTaxonomyDirectory(LuceneIndex luceneIndex, bool forceUnlock)

Parameters

luceneIndex LuceneIndex
forceUnlock bool

If true, will force unlock the directory when created

Returns

Directory

The taxonomy directory, or null if taxonomy is not enabled for this index

Remarks

Any subsequent calls for the same index will return the same directory instance. If this returns null, taxonomy-based faceting will not be available for this index.