Method AddDoubleDocValuesField
AddDoubleDocValuesField(Document, String, Double)
Adds a new DoubleDocValuesField field with the specified 64-bit double value
Declaration
public static DoubleDocValuesField AddDoubleDocValuesField(this Document document, string name, double value)
Parameters
Type | Name | Description |
---|---|---|
Document | document | This Document. |
System.String | name | field name |
System.Double | value | 64-bit double value |
Returns
Type | Description |
---|---|
DoubleDocValuesField | The field that was added to this Document. |
Remarks
Syntactic sugar for encoding doubles as NumericDocValues via DoubleToRawInt64Bits(Double).
Per-document double values can be retrieved via GetDoubles(AtomicReader, String, Boolean).
NOTE: In most all cases this will be rather inefficient, requiring eight bytes per document. Consider encoding double values yourself with only as much precision as you require.