Class DefaultDocValuesFormatFactory
LUCENENET specific class that implements the default functionality for the
IDoc
The most common use cases are:
- Initialize Default
Doc with a set of CustomValues Format Factory Doc .Values Format Types - Subclass Default
Doc and override GetValues Format Factory Doc so an external dependency injection container can be used to supply the instances (lifetime should be singleton). Note that you could alternately use the "named type" feature that many DI containers have to supply the type based on name by overriding GetValues Format(Type) Doc .Values Format(String) - Subclass Default
Doc and override GetValues Format Factory Doc so a type new type can be supplied that is not in the Lucene.Values Format Type(String) Net. .Codecs. Default Doc Values Format Factory. doc Values Format Name To Type Map - Subclass Default
Doc to add new or override the default DocValues Format Factory Values types by overriding Initialize() and calling PutFormat Doc .Values Format Type(Type) - Subclass Default
Doc to scan additional assemblies for DocValues Format Factory Values subclasses in by overriding Initialize() and calling ScanFormat For . For performance reasons, the default behavior only loads Lucene.Net codecs.Doc Values Formats(Assembly)
To set the IDoc
Inherited Members
Namespace: Lucene.Net.Codecs
Assembly: Lucene.Net.dll
Syntax
public class DefaultDocValuesFormatFactory : NamedServiceFactory<DocValuesFormat>, IDocValuesFormatFactory, IServiceListable
Constructors
| Improve this Doc View SourceDefaultDocValuesFormatFactory()
Creates a new instance of Default
Declaration
public DefaultDocValuesFormatFactory()
Properties
| Improve this Doc View SourceAvailableServices
Gets a list of the available Doc
Declaration
public virtual ICollection<string> AvailableServices { get; }
Property Value
Type | Description |
---|---|
ICollection<System. |
A ICollection{string} of Doc |
CustomDocValuesFormatTypes
An array of custom Doc
These types will be registered after the default Lucene types, so if a custom type has the same
name as a Lucene Doc
Declaration
public IEnumerable<Type> CustomDocValuesFormatTypes { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<Type> |
Methods
| Improve this Doc View SourceGetDocValuesFormat(String)
Gets the Docname
.
Declaration
public virtual DocValuesFormat GetDocValuesFormat(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the Doc |
Returns
Type | Description |
---|---|
Doc |
The Doc |
GetDocValuesFormat(Type)
Gets the Doctype
.
Declaration
protected virtual DocValuesFormat GetDocValuesFormat(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The |
Returns
Type | Description |
---|---|
Doc |
The Doc |
GetDocValuesFormatType(String)
Gets the Docname
.
Declaration
protected virtual Type GetDocValuesFormatType(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the Doc |
Returns
Type | Description |
---|---|
Type | The Doc |
Initialize()
Initializes the doc values type cache with the known Docbase.Initialize()
) to add your
own Doc
If two types have the same name by using the Doc
Declaration
protected override void Initialize()
Overrides
NewDocValuesFormat(Type)
Instantiates a Doctype
.
Declaration
protected virtual DocValuesFormat NewDocValuesFormat(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The |
Returns
Type | Description |
---|---|
Doc |
The new instance. |
PutDocValuesFormatType(Type)
Adds a Doc
Note that if a Doc
Declaration
protected virtual void PutDocValuesFormatType(Type docValuesFormat)
Parameters
Type | Name | Description |
---|---|---|
Type | docValuesFormat | A type that subclasses Doc |
ScanForDocValuesFormats(Assembly)
Scans the given assembly
for subclasses of Doc
Declaration
protected virtual void ScanForDocValuesFormats(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | The assembly to scan. |
ScanForDocValuesFormats(IEnumerable<Assembly>)
Scans the given assemblies
for subclasses of Codec
and adds their names to the Lucene.
Declaration
protected virtual void ScanForDocValuesFormats(IEnumerable<Assembly> assemblies)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Assembly> | assemblies | A list of assemblies to scan. The assemblies will be scanned from first to last,
and the last match for each Doc |