java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.CompositeFieldScript
A script that emits a map of multiple values, that can then be accessed
by child runtime fields.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptContext<CompositeFieldScript.Factory>
static final String[]
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, source
Fields inherited from class org.elasticsearch.script.DocBasedScript
docReader
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeFieldScript
(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
protected void
Runs the object script and returns the values that were emitted for the provided field nameprotected void
Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, emitValueFromCompositeScript, execute, extractFromSource, getParams, newContext, runForDoc
Methods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument, source
-
Field Details
-
CONTEXT
-
PARAMETERS
-
-
Constructor Details
-
CompositeFieldScript
public CompositeFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
getValues
Runs the object script and returns the values that were emitted for the provided field name- Parameters:
field
- the field name to extract values from- Returns:
- the values that were emitted for the provided field
-
prepareExecute
protected void prepareExecute()- Specified by:
prepareExecute
in classAbstractFieldScript
-
getFieldValues
-
emit
-
emitFromObject
- Specified by:
emitFromObject
in classAbstractFieldScript
-