Package org.elasticsearch.script
Class CompositeFieldScript
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
Modifier and TypeClassDescriptionstatic class
static class
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ScriptContext<CompositeFieldScript.Factory>
static final String[]
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceLookup
Fields inherited from class org.elasticsearch.script.DocBasedScript
docReader
-
Constructor Summary
ConstructorDescriptionCompositeFieldScript
(String fieldName, Map<String, Object> params, SearchLookup searchLookup, 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 namerunForDoc
(int doc) Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, execute, extractFromSource, getParams
Methods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument
-
Field Details
-
CONTEXT
-
PARAMETERS
-
-
Constructor Details
-
CompositeFieldScript
public CompositeFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, 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
-
runForDoc
-
emit
-
emitFromObject
- Specified by:
emitFromObject
in classAbstractFieldScript
-