Method AddSingleField
AddSingleField(Document, String, Single, Field.Store)
Adds a stored or un-stored SingleField with the provided value
and default precisionStep
PRECISION_STEP_DEFAULT
(4).
Declaration
public static SingleField AddSingleField(this Document document, string name, float value, Field.Store stored)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Single | value | 32-bit |
Field.Store | stored | YES if the content should also be stored |
Returns
Type | Description |
---|---|
SingleField | The field that was added to this Document. |
AddSingleField(Document, String, Single, FieldType)
Adds a stored or un-stored SingleField with the provided value.
Expert: allows you to customize the FieldType.
Declaration
public static SingleField AddSingleField(this Document document, string name, float value, FieldType type)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Single | value | 32-bit |
FieldType | type | customized field type: must have NumericType of SINGLE. |
Returns
Type | Description |
---|---|
SingleField | The field that was added to this Document. |