public class FloatDocValuesField extends NumericDocValuesField
Float.floatToRawIntBits(float)
.
Per-document floating point values can be retrieved via
LeafReader.getNumericDocValues(String)
.
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.
Field.Store
TYPE
boost, fieldsData, name, tokenStream, type
Constructor and Description |
---|
FloatDocValuesField(String name,
float value)
Creates a new DocValues field with the specified 32-bit float value
|
Modifier and Type | Method and Description |
---|---|
void |
setFloatValue(float value)
Expert: change the value of this field.
|
void |
setLongValue(long value)
Expert: change the value of this field.
|
newExactQuery, newRangeQuery
binaryValue, boost, fieldType, name, numericValue, readerValue, setBoost, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setIntValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toString
public FloatDocValuesField(String name, float value)
name
- field namevalue
- 32-bit float valueIllegalArgumentException
- if the field name is nullpublic void setFloatValue(float value)
Field
Field.setStringValue(String)
.setFloatValue
in class Field
public void setLongValue(long value)
Field
Field.setStringValue(String)
.setLongValue
in class Field
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.