Class DefaultDocValuesFormatFactory
LUCENENET specific class that implements the default functionality for the IDocValuesFormatFactory.
The most common use cases are:
- subclass DefaultDocValuesFormatFactory and override GetDocValuesFormat(Type) 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 GetDocValuesFormat(String).
- subclass DefaultDocValuesFormatFactory and override GetDocValuesFormatType(String) so a type new type can be supplied that is not in the Lucene.Net.Codecs.DefaultDocValuesFormatFactory.docValuesFormatNameToTypeMap.
- subclass DefaultDocValuesFormatFactory to add new or override the default DocValuesFormat types by overriding Initialize() and calling PutDocValuesFormatType(Type).
- subclass DefaultDocValuesFormatFactory to scan additional assemblies for DocValuesFormat subclasses in by overriding Initialize() and calling ScanForDocValuesFormats(Assembly). For performance reasons, the default behavior only loads Lucene.Net codecs.
To set the IDocValuesFormatFactory, call SetDocValuesFormatFactory(IDocValuesFormatFactory).
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public class DefaultDocValuesFormatFactory : NamedServiceFactory<DocValuesFormat>, IDocValuesFormatFactory, IServiceListable
Methods
Name | Description |
---|---|
AvailableServices() | Gets a list of the available DocValuesFormats (by name). |
GetDocValuesFormat(String) | Gets the DocValuesFormat instance from the provided |
GetDocValuesFormat(Type) | Gets the DocValuesFormat instance from the provided |
GetDocValuesFormatType(String) | Gets the DocValuesFormat |
Initialize() | Initializes the doc values type cache with the known DocValuesFormat types.
Override this method (and optionally call If two types have the same name by using the DocValuesFormatNameAttribute, the last one registered wins. |
PutDocValuesFormatType(Type) | Adds a DocValuesFormat type to the Lucene.Net.Codecs.DefaultDocValuesFormatFactory.docValuesFormatNameToTypeMap, using the name provided in the DocValuesFormatNameAttribute, if present, or the name of the codec class minus the "DocValuesFormat" suffix as the name by default. Note that if a DocValuesFormat with the same name already exists in the map, calling this method will update it to the new type. |
ScanForDocValuesFormats(Assembly) | Scans the given |
ScanForDocValuesFormats(IEnumerable<Assembly>) | Scans the given |