Package org.elasticsearch.script
Class DoubleFieldScript
java.lang.Object
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.DoubleFieldScript
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic interface -
Field Summary
FieldsFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, leafSearchLookup, MAX_VALUES -
Constructor Summary
ConstructorsConstructorDescriptionDoubleFieldScript(String fieldName, Map<String,Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionintcount()The number of results produced the last timerunForDoc(int)was called.voidemit(double v)protected voidvoidrunForDoc(int docId)Execute the script for the provideddocId.voidrunForDoc(int docId, DoubleConsumer consumer)Execute the script for the provideddocId, passing results to theconsumerdouble[]values()Values from the last timerunForDoc(int)was called.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromSource, execute, extractFromSource, getDoc, getParams, setDocument
-
Field Details
-
CONTEXT
-
PARSE_FROM_SOURCE
-
PARAMETERS
-
-
Constructor Details
-
DoubleFieldScript
public DoubleFieldScript(String fieldName, Map<String,Object> 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
Execute the script for the provideddocId, passing results to theconsumer -
values
public final double[] 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. -
emitFromObject
- Specified by:
emitFromObjectin classAbstractFieldScript
-
emit
public final void emit(double v)
-