Class SingleDocValuesField
Syntactic sugar for encoding floats as NumericDocValues via SingleToRawInt32Bits(Single).
Per-document floating point values can be retrieved via GetSingles(AtomicReader, String, Boolean).
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
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Documents
Assembly: Lucene.Net.dll
Syntax
public class SingleDocValuesField : NumericDocValuesField, IIndexableField
Constructors
| Improve this Doc View SourceSingleDocValuesField(String, Single)
Creates a new DocValues field with the specified 32-bit System.Single value
Declaration
public SingleDocValuesField(string name, float value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | field name |
System.Single | value | 32-bit System.Single value |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if the field name is |
Methods
| Improve this Doc View SourceSetInt64Value(Int64)
Declaration
public override void SetInt64Value(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value |
Overrides
| Improve this Doc View SourceSetSingleValue(Single)
Declaration
public override void SetSingleValue(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value |