Table of Contents

Class FieldValueTypeCollection

Namespace
Examine.Lucene
Assembly
Examine.Lucene.dll

Maintains a collection of field names names and their IIndexFieldValueType for an index

public class FieldValueTypeCollection
Inheritance
FieldValueTypeCollection
Inherited Members

Constructors

FieldValueTypeCollection(Analyzer, IReadOnlyDictionary<string, IFieldValueTypeFactory>, ReadOnlyFieldDefinitionCollection)

public FieldValueTypeCollection(Analyzer defaultAnalyzer, IReadOnlyDictionary<string, IFieldValueTypeFactory> valueTypeFactories, ReadOnlyFieldDefinitionCollection fieldDefinitionCollection)

Parameters

defaultAnalyzer Analyzer

The default Analyzer to use for the resulting Lucene.Net.Analysis.Miscellaneous.PerFieldAnalyzerWrapper used for indexing

valueTypeFactories IReadOnlyDictionary<string, IFieldValueTypeFactory>

List of value type factories to initialize the collection with

fieldDefinitionCollection ReadOnlyFieldDefinitionCollection

Properties

Analyzer

Returns the PerFieldAnalyzerWrapper

public PerFieldAnalyzerWrapper Analyzer { get; }

Property Value

PerFieldAnalyzerWrapper

ValueTypeFactories

Defines the field types such as number, fulltext, etc...

public ValueTypeFactoryCollection ValueTypeFactories { get; }

Property Value

ValueTypeFactoryCollection

ValueTypes

Returns the resolved collection of IIndexFieldValueType for this index

public IEnumerable<IIndexFieldValueType> ValueTypes { get; }

Property Value

IEnumerable<IIndexFieldValueType>

Methods

GetValueType(string)

Returns the value type for the field name specified

public IIndexFieldValueType GetValueType(string fieldName)

Parameters

fieldName string

Returns

IIndexFieldValueType

Exceptions

InvalidOperationException

Throws an exception if a value type was not found

GetValueType(string, IFieldValueTypeFactory)

Returns the IIndexFieldValueType for the field name specified

public IIndexFieldValueType GetValueType(string fieldName, IFieldValueTypeFactory fieldValueTypeFactory)

Parameters

fieldName string
fieldValueTypeFactory IFieldValueTypeFactory

Returns

IIndexFieldValueType

Remarks

If it's not found it will create one with the factory supplied and initialize it.