java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.StringFieldScript
- Direct Known Subclasses:
SortedSetDocValuesStringFieldScript
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptContext<StringFieldScript.Factory>
static final long
The maximum number of chars a script should be allowed to emit.static final String[]
static final StringFieldScript.Factory
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, source
Fields inherited from class org.elasticsearch.script.DocBasedScript
docReader
-
Constructor Summary
ConstructorsConstructorDescriptionStringFieldScript
(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
protected void
protected void
Values from the last time runForDoc(int) was called.static StringFieldScript.Factory
leafAdapter
(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) protected void
final void
Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, execute, extractFromSource, getParams, newContext, runForDoc
Methods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument, source
-
Field Details
-
MAX_CHARS
public static final long MAX_CHARSThe maximum number of chars a script should be allowed to emit.- See Also:
-
CONTEXT
-
PARSE_FROM_SOURCE
-
PARAMETERS
-
-
Constructor Details
-
StringFieldScript
public StringFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
leafAdapter
public static StringFieldScript.Factory leafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) -
prepareExecute
protected void prepareExecute()- Specified by:
prepareExecute
in classAbstractFieldScript
-
runForDoc
-
getValues
Values from the last time runForDoc(int) was called. This list is mutable and will change with the next call of runForDoc(int). -
emitValueFromCompositeScript
- Overrides:
emitValueFromCompositeScript
in classAbstractFieldScript
-
emitFromObject
- Specified by:
emitFromObject
in classAbstractFieldScript
-
emit
-