Module org.elasticsearch.server
Package org.elasticsearch.script.field
Class DateNanosDocValuesField
java.lang.Object
org.elasticsearch.script.field.AbstractScriptFieldFactory<ZonedDateTime>
org.elasticsearch.script.field.DateNanosDocValuesField
- All Implemented Interfaces:
Iterable<ZonedDateTime>
,ScriptDocValues.Supplier<ZonedDateTime>
,DocValuesScriptFieldFactory
,Field<ZonedDateTime>
,ScriptFieldFactory
public class DateNanosDocValuesField
extends AbstractScriptFieldFactory<ZonedDateTime>
implements Field<ZonedDateTime>, DocValuesScriptFieldFactory, ScriptDocValues.Supplier<ZonedDateTime>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDateNanosDocValuesField
(org.apache.lucene.index.SortedNumericDocValues input, String name) -
Method Summary
Modifier and TypeMethodDescriptionget
(int index, ZonedDateTime defaultValue) get
(ZonedDateTime defaultValue) getInternal
(int index) getName()
Returns the name of 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.Returns aScriptDocValues
of the appropriate type for this field.Methods inherited from class org.elasticsearch.script.field.AbstractScriptFieldFactory
toScriptField
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
Methods inherited from interface org.elasticsearch.script.field.ScriptFieldFactory
toScriptField
-
Field Details
-
input
protected final org.apache.lucene.index.SortedNumericDocValues input -
name
-
values
-
count
protected int count
-
-
Constructor Details
-
DateNanosDocValuesField
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesScriptFieldFactory
Set the current document ID.- Specified by:
setNextDocId
in interfaceDocValuesScriptFieldFactory
- Specified by:
setNextDocId
in interfaceScriptDocValues.Supplier<ZonedDateTime>
- Throws:
IOException
-
resize
protected void resize(int newSize) -
toScriptDocValues
Description copied from interface:DocValuesScriptFieldFactory
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:
toScriptDocValues
in interfaceDocValuesScriptFieldFactory
-
getInternal
- Specified by:
getInternal
in interfaceScriptDocValues.Supplier<ZonedDateTime>
-
getName
Description copied from interface:Field
Returns the name of this field.- Specified by:
getName
in interfaceField<ZonedDateTime>
-
isEmpty
public boolean isEmpty()Description copied from interface:Field
Returnstrue
if this field has no values, otherwisefalse
.- Specified by:
isEmpty
in interfaceField<ZonedDateTime>
-
size
public int size()Description copied from interface:Field
Returns the number of values this field has.- Specified by:
size
in interfaceField<ZonedDateTime>
- Specified by:
size
in interfaceScriptDocValues.Supplier<ZonedDateTime>
-
get
-
get
-
iterator
- Specified by:
iterator
in interfaceIterable<ZonedDateTime>
-