Package org.elasticsearch.script.field
Class FloatDocValuesField
java.lang.Object
org.elasticsearch.script.field.FloatDocValuesField
- All Implemented Interfaces:
Iterable<Float>
,ScriptDocValues.Supplier<Double>
,DocValuesField<Float>
,Field<Float>
public class FloatDocValuesField
extends Object
implements DocValuesField<Float>, ScriptDocValues.Supplier<Double>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
get
(float defaultValue) float
get
(int index, float defaultValue) getInternal
(int index) getName()
Returns the name of this field.Returns aScriptDocValues
of the appropriate type for this field.boolean
isEmpty()
Returnstrue
if this field has no values, otherwisefalse
.iterator()
protected void
resize
(int newSize) void
setNextDocId
(int docId) Set the current document ID.int
size()
Returns the number of values this field has.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
input
-
name
-
values
protected float[] values -
count
protected int count
-
-
Constructor Details
-
FloatDocValuesField
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesField
Set the current document ID.- Specified by:
setNextDocId
in interfaceDocValuesField<Float>
- Specified by:
setNextDocId
in interfaceScriptDocValues.Supplier<Double>
- Throws:
IOException
-
resize
protected void resize(int newSize) -
getScriptDocValues
Returns aScriptDocValues
of the appropriate type for this field. This is used to support backwards compatibility for accessing field values through thedoc
variable.- Specified by:
getScriptDocValues
in interfaceDocValuesField<Float>
-
getInternal
- Specified by:
getInternal
in interfaceScriptDocValues.Supplier<Double>
-
getName
Returns the name of this field. -
isEmpty
public boolean isEmpty()Returnstrue
if this field has no values, otherwisefalse
. -
size
public int size()Returns the number of values this field has. -
iterator
-
get
public float get(float defaultValue) -
get
public float get(int index, float defaultValue)
-