Table of Contents

Class ServicesCollectionExtensions

Namespace
Examine
Assembly
Examine.dll

Extensions for IServiceCollection

public static class ServicesCollectionExtensions
Inheritance
ServicesCollectionExtensions
Inherited Members

Methods

AddExamine(IServiceCollection, DirectoryInfo?)

Adds the Examine core services

public static IServiceCollection AddExamine(this IServiceCollection services, DirectoryInfo? appRootDirectory = null)

Parameters

services IServiceCollection
appRootDirectory DirectoryInfo

Returns

IServiceCollection

AddExamineLuceneIndex(IServiceCollection, string, FieldDefinitionCollection?, Analyzer?, IValueSetValidator?, IReadOnlyDictionary<string, IFieldValueTypeFactory>?)

Registers a file system based Lucene Examine index

[Obsolete("To remove in Examine V5")]
public static IServiceCollection AddExamineLuceneIndex(this IServiceCollection serviceCollection, string name, FieldDefinitionCollection? fieldDefinitions = null, Analyzer? analyzer = null, IValueSetValidator? validator = null, IReadOnlyDictionary<string, IFieldValueTypeFactory>? indexValueTypesFactory = null)

Parameters

serviceCollection IServiceCollection
name string
fieldDefinitions FieldDefinitionCollection
analyzer Analyzer
validator IValueSetValidator
indexValueTypesFactory IReadOnlyDictionary<string, IFieldValueTypeFactory>

Returns

IServiceCollection

AddExamineLuceneIndex(IServiceCollection, string, Action<ExamineLuceneIndexConfiguration<LuceneIndex, FileSystemDirectoryFactory>>)

Registers a file system based Lucene Examine index

public static IServiceCollection AddExamineLuceneIndex(this IServiceCollection serviceCollection, string name, Action<ExamineLuceneIndexConfiguration<LuceneIndex, FileSystemDirectoryFactory>> configuration)

Parameters

serviceCollection IServiceCollection
name string
configuration Action<ExamineLuceneIndexConfiguration<LuceneIndex, FileSystemDirectoryFactory>>

Returns

IServiceCollection

AddExamineLuceneIndex<TIndex>(IServiceCollection, string, FieldDefinitionCollection?, Analyzer?, IValueSetValidator?, IReadOnlyDictionary<string, IFieldValueTypeFactory>?)

Registers a file system based Lucene Examine index

[Obsolete("To remove in Examine V5")]
public static IServiceCollection AddExamineLuceneIndex<TIndex>(this IServiceCollection serviceCollection, string name, FieldDefinitionCollection? fieldDefinitions = null, Analyzer? analyzer = null, IValueSetValidator? validator = null, IReadOnlyDictionary<string, IFieldValueTypeFactory>? indexValueTypesFactory = null) where TIndex : LuceneIndex

Parameters

serviceCollection IServiceCollection
name string
fieldDefinitions FieldDefinitionCollection
analyzer Analyzer
validator IValueSetValidator
indexValueTypesFactory IReadOnlyDictionary<string, IFieldValueTypeFactory>

Returns

IServiceCollection

Type Parameters

TIndex

AddExamineLuceneIndex<TIndex>(IServiceCollection, string, Action<ExamineLuceneIndexConfiguration<TIndex, FileSystemDirectoryFactory>>)

Registers a file system based Lucene Examine index

public static IServiceCollection AddExamineLuceneIndex<TIndex>(this IServiceCollection serviceCollection, string name, Action<ExamineLuceneIndexConfiguration<TIndex, FileSystemDirectoryFactory>> configuration) where TIndex : LuceneIndex

Parameters

serviceCollection IServiceCollection
name string
configuration Action<ExamineLuceneIndexConfiguration<TIndex, FileSystemDirectoryFactory>>

Returns

IServiceCollection

Type Parameters

TIndex

AddExamineLuceneIndex<TIndex, TDirectoryFactory>(IServiceCollection, string, FieldDefinitionCollection?, Analyzer?, IValueSetValidator?, IReadOnlyDictionary<string, IFieldValueTypeFactory>?)

Registers an Examine index

[Obsolete("To remove in Examine V5")]
public static IServiceCollection AddExamineLuceneIndex<TIndex, TDirectoryFactory>(this IServiceCollection serviceCollection, string name, FieldDefinitionCollection? fieldDefinitions = null, Analyzer? analyzer = null, IValueSetValidator? validator = null, IReadOnlyDictionary<string, IFieldValueTypeFactory>? indexValueTypesFactory = null) where TIndex : LuceneIndex where TDirectoryFactory : class, IDirectoryFactory

Parameters

serviceCollection IServiceCollection
name string
fieldDefinitions FieldDefinitionCollection
analyzer Analyzer
validator IValueSetValidator
indexValueTypesFactory IReadOnlyDictionary<string, IFieldValueTypeFactory>

Returns

IServiceCollection

Type Parameters

TIndex
TDirectoryFactory

AddExamineLuceneIndex<TIndex, TDirectoryFactory>(IServiceCollection, string, Action<ExamineLuceneIndexConfiguration<TIndex, TDirectoryFactory>>)

Registers an Examine index

public static IServiceCollection AddExamineLuceneIndex<TIndex, TDirectoryFactory>(this IServiceCollection serviceCollection, string name, Action<ExamineLuceneIndexConfiguration<TIndex, TDirectoryFactory>> configuration) where TIndex : LuceneIndex where TDirectoryFactory : class, IDirectoryFactory

Parameters

serviceCollection IServiceCollection
name string
configuration Action<ExamineLuceneIndexConfiguration<TIndex, TDirectoryFactory>>

Returns

IServiceCollection

Type Parameters

TIndex
TDirectoryFactory

AddExamineLuceneMultiSearcher(IServiceCollection, string, string[], Analyzer?)

Registers a lucene multi index searcher

[Obsolete("Will be removed in Examine V5")]
public static IServiceCollection AddExamineLuceneMultiSearcher(this IServiceCollection serviceCollection, string name, string[] indexNames, Analyzer? analyzer = null)

Parameters

serviceCollection IServiceCollection
name string
indexNames string[]
analyzer Analyzer

Returns

IServiceCollection

AddExamineLuceneMultiSearcher(IServiceCollection, string, string[], Action<ExamineLuceneMultiSearcherConfiguration>?)

Registers a lucene multi index searcher

public static IServiceCollection AddExamineLuceneMultiSearcher(this IServiceCollection serviceCollection, string name, string[] indexNames, Action<ExamineLuceneMultiSearcherConfiguration>? configuration = null)

Parameters

serviceCollection IServiceCollection
name string
indexNames string[]
configuration Action<ExamineLuceneMultiSearcherConfiguration>

Returns

IServiceCollection

AddExamineSearcher<TSearcher>(IServiceCollection, string, Func<IServiceProvider, IList<object>>)

Registers a standalone Examine searcher

public static IServiceCollection AddExamineSearcher<TSearcher>(this IServiceCollection serviceCollection, string name, Func<IServiceProvider, IList<object>> parameterFactory) where TSearcher : ISearcher

Parameters

serviceCollection IServiceCollection
name string
parameterFactory Func<IServiceProvider, IList<object>>

A factory to fullfill the custom searcher construction parameters excluding the name that are not already registerd in DI.

Returns

IServiceCollection

Type Parameters

TSearcher