Class SingleDocValuesField
Syntactic sugar for encoding floats as NumericDocValues via SingleToRawInt32Bits(float).
Per-document floating point values can be retrieved via GetSingles(AtomicReader, string, bool).
NOTE: In most all cases this will be rather inefficient, requiring four bytes per document. Consider encoding floating point values yourself with only as much precision as you require.
NOTE: This was FloatDocValuesField in Lucene
Inherited Members
Namespace: Lucene.Net.Documents
Assembly: Lucene.Net.dll
Syntax
public class SingleDocValuesField : NumericDocValuesField, IIndexableField, IFormattable
Constructors
SingleDocValuesField(string, float)
Creates a new DocValues field with the specified 32-bit float value
Declaration
public SingleDocValuesField(string name, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | field name |
| float | value | 32-bit float value |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | if the field name is |
Methods
SetInt64Value(long)
Expert: change the value of this field. See SetStringValue(string).
Declaration
public override void SetInt64Value(long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value |
Overrides
SetSingleValue(float)
Expert: change the value of this field. See SetStringValue(string).
Declaration
public override void SetSingleValue(float value)
Parameters
| Type | Name | Description |
|---|---|---|
| float | value |