Package org.elasticsearch.script
Class StringFieldScript
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 classstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptContext<StringFieldScript.Factory>static final longThe maximum number of chars a script should be allowed to emit.static final String[]static final StringFieldScript.FactoryFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceLookupFields inherited from class org.elasticsearch.script.DocBasedScript
docReader -
Constructor Summary
ConstructorsConstructorDescriptionStringFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidprotected voidstatic StringFieldScript.FactoryleafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) resultsForDoc(int docId) Execute the script for the provideddocId.final voidMethods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, execute, extractFromSource, getParamsMethods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument
-
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, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
leafAdapter
public static StringFieldScript.Factory leafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) -
resultsForDoc
Execute the script for the provideddocId.- Returns:
- a mutable
Listthat contains the results of the script and will be modified the next time you call resultsForDoc(int).
-
runForDoc
-
emitFromObject
- Specified by:
emitFromObjectin classAbstractFieldScript
-
emit
-