Property NumericType
NumericType
Gets the NumericFieldType of the underlying value, or NONE if the value is not set or non-numeric.
Expert: The difference between this property and NumericType is this is represents the current state of the field (whether being written or read) and the FieldType property represents instructions on how the field will be written, but does not re-populate when reading back from an index (it is write-only).
In Java, the numeric type was determined by checking the type of
GetNumericValue(). However, since there are no reference number
types in .NET, using GetNumericValue() so will cause boxing/unboxing. It is
therefore recommended to use this property to check the underlying type and the corresponding
Get*Value()
method to retrieve the value.
NOTE: Since Lucene codecs do not support BYTE or INT16, fields created with these types will always be INT32 when read back from the index.
Declaration
public virtual NumericFieldType NumericType { get; }
Property Value
Type | Description |
---|---|
NumericFieldType |