java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.DoubleFieldScript
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptContext<DoubleFieldScript.Factory> static final String[]static final DoubleFieldScript.FactoryFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceFields inherited from class org.elasticsearch.script.DocBasedScript
docReader -
Constructor Summary
ConstructorsConstructorDescriptionDoubleFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionfinal intcount()The number of results produced the last timeAbstractFieldScript.runForDoc(int)was called.final voidemit(double v) protected voidstatic DoubleFieldScript.FactoryleafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) protected voidfinal voidrunForDoc(int docId, DoubleConsumer consumer) Execute the script for the provideddocId, passing results to theconsumerfinal double[]values()Values from the last timeAbstractFieldScript.runForDoc(int)was called.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, emitValueFromCompositeScript, execute, extractFromSource, getParams, newContext, runForDocMethods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument, source
-
Field Details
-
CONTEXT
-
PARSE_FROM_SOURCE
-
PARAMETERS
-
-
Constructor Details
-
DoubleFieldScript
public DoubleFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
leafAdapter
public static DoubleFieldScript.Factory leafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) -
prepareExecute
protected void prepareExecute()- Specified by:
prepareExecutein classAbstractFieldScript
-
runForDoc
Execute the script for the provideddocId, passing results to theconsumer -
values
public final double[] values()Values from the last timeAbstractFieldScript.runForDoc(int)was called. This array is mutable and will change with the next call ofAbstractFieldScript.runForDoc(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 timeAbstractFieldScript.runForDoc(int)was called. -
emitFromObject
- Specified by:
emitFromObjectin classAbstractFieldScript
-
emit
public final void emit(double v)
-