Package org.elasticsearch.script.field
Class IntegerDocValuesField
java.lang.Object
org.elasticsearch.script.field.IntegerDocValuesField
- All Implemented Interfaces:
Iterable<Integer>,ScriptDocValues.Supplier<Long>,DocValuesField<Integer>,Field<Integer>
public class IntegerDocValuesField
extends Object
implements DocValuesField<Integer>, ScriptDocValues.Supplier<Long>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntegerDocValuesField(org.apache.lucene.index.SortedNumericDocValues input, String name) -
Method Summary
Modifier and TypeMethodDescriptionintget(int defaultValue) intget(int index, int defaultValue) getInternal(int index) getName()Returns the name of this field.Returns aScriptDocValuesof the appropriate type for this field.booleanisEmpty()Returnstrueif this field has no values, otherwisefalse.iterator()protected voidresize(int newSize) voidsetNextDocId(int docId) Set the current document ID.intsize()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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
input
protected final org.apache.lucene.index.SortedNumericDocValues input -
name
-
values
protected int[] values -
count
protected int count
-
-
Constructor Details
-
IntegerDocValuesField
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesFieldSet the current document ID.- Specified by:
setNextDocIdin interfaceDocValuesField<Integer>- Specified by:
setNextDocIdin interfaceScriptDocValues.Supplier<Long>- Throws:
IOException
-
resize
protected void resize(int newSize) -
getScriptDocValues
Returns aScriptDocValuesof the appropriate type for this field. This is used to support backwards compatibility for accessing field values through thedocvariable.- Specified by:
getScriptDocValuesin interfaceDocValuesField<Integer>
-
getInternal
- Specified by:
getInternalin interfaceScriptDocValues.Supplier<Long>
-
getName
Returns the name of this field. -
isEmpty
public boolean isEmpty()Returnstrueif this field has no values, otherwisefalse. -
size
public int size()Returns the number of values this field has. -
iterator
-
get
public int get(int defaultValue) -
get
public int get(int index, int defaultValue)
-