Package org.elasticsearch.script
Class AbstractLongFieldScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.AbstractLongFieldScript
- Direct Known Subclasses:
DateFieldScript
,GeoPointFieldScript
,LongFieldScript
Common base class for script field scripts that return long values.
-
Field Summary
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, leafSearchLookup, MAX_VALUES
-
Constructor Summary
ConstructorDescriptionfieldName, <,> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
Method Summary
Modifier and TypeMethodDescriptionint
count()
The number of results produced the last timerunForDoc(int)
was called.void
emit(long v)
void
runForDoc(int docId)
Execute the script for the provideddocId
.void
runForDoc(int docId, consumer)
Execute the script for the provideddocId
, passing results to theconsumer
long[]
values()
Values from the last timerunForDoc(int)
was called.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromObject, emitFromSource, execute, extractFromSource, getDoc, getParams, setDocument
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Constructor Details
-
AbstractLongFieldScript
public AbstractLongFieldScript( fieldName, <,> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
runForDoc
public final void runForDoc(int docId)Execute the script for the provideddocId
. -
runForDoc
public final void runForDoc(int docId, consumer)Execute the script for the provideddocId
, passing results to theconsumer
-
values
public final long[] values()Values from the last timerunForDoc(int)
was called. This array is mutable and will change with the next call ofrunForDoc(int)
. It is also oversized and will contain garbage at all indices at and abovecount()
. -
count
public final int count()The number of results produced the last timerunForDoc(int)
was called. -
emit
public final void emit(long v)
-