Table of Contents

Class FileSystemDirectoryFactory

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

Represents a directory factory for creating file system directories

public class FileSystemDirectoryFactory : IDirectoryFactory, ITaxonomyDirectoryFactory
Inheritance
FileSystemDirectoryFactory
Implements
Derived
Inherited Members

Constructors

FileSystemDirectoryFactory(DirectoryInfo, ILockFactory)

Creates an instance of FileSystemDirectoryFactory

[Obsolete("To remove in Examine 5.0")]
public FileSystemDirectoryFactory(DirectoryInfo baseDir, ILockFactory lockFactory)

Parameters

baseDir DirectoryInfo
lockFactory ILockFactory

FileSystemDirectoryFactory(DirectoryInfo, ILockFactory, IOptionsMonitor<LuceneDirectoryIndexOptions>)

Creates an instance of FileSystemDirectoryFactory

public FileSystemDirectoryFactory(DirectoryInfo baseDir, ILockFactory lockFactory, IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions)

Parameters

baseDir DirectoryInfo
lockFactory ILockFactory
indexOptions IOptionsMonitor<LuceneDirectoryIndexOptions>

Properties

IndexOptions

Provides access to index options for Lucene directories.

protected IOptionsMonitor<LuceneDirectoryIndexOptions> IndexOptions { get; }

Property Value

IOptionsMonitor<LuceneDirectoryIndexOptions>

LockFactory

The factory for creating locks

public ILockFactory LockFactory { get; }

Property Value

ILockFactory

Methods

CreateDirectory(LuceneIndex, bool)

Creates the directory instance

public virtual 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 virtual 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.