Class FieldValueTypeCollection
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)
Create a FieldValueTypeCollection
public FieldValueTypeCollection(Analyzer defaultAnalyzer, IReadOnlyDictionary<string, IFieldValueTypeFactory> valueTypeFactories, ReadOnlyFieldDefinitionCollection fieldDefinitionCollection)
Parameters
defaultAnalyzerAnalyzerThe default Analyzer to use for the resulting Lucene.Net.Analysis.Miscellaneous.PerFieldAnalyzerWrapper used for indexing
valueTypeFactoriesIReadOnlyDictionary<string, IFieldValueTypeFactory>List of value type factories to initialize the collection with
fieldDefinitionCollectionReadOnlyFieldDefinitionCollection
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
ValueTypes
Returns the resolved collection of IIndexFieldValueType for this index
public IEnumerable<IIndexFieldValueType> ValueTypes { get; }
Property Value
Methods
GetValueType(string)
Returns the value type for the field name specified
public IIndexFieldValueType GetValueType(string fieldName)
Parameters
fieldNamestring
Returns
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
fieldNamestringfieldValueTypeFactoryIFieldValueTypeFactory
Returns
Remarks
If it's not found it will create one with the factory supplied and initialize it.