public class FloatDocValuesField extends NumericDocValuesField
Float.floatToRawIntBits(float).
Per-document floating point values can be retrieved via
FieldCache.getFloats(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.
Field.Index, Field.Store, Field.TermVectorTYPE| 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.
|
binaryValue, boost, fieldType, name, numericValue, readerValue, setBoost, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setIntValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toString, translateFieldTypepublic FloatDocValuesField(String name, float value)
name - field namevalue - 32-bit float valueIllegalArgumentException - if the field name is nullpublic void setFloatValue(float value)
FieldField.setStringValue(String).setFloatValue in class Fieldpublic void setLongValue(long value)
FieldField.setStringValue(String).setLongValue in class FieldCopyright © 2010 - 2020 Adobe. All Rights Reserved