Package org.elasticsearch.script
Class StringFieldScript
java.lang.Object
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.StringFieldScript
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic long
The maximum number of chars a script should be allowed to emit.static String[]
static StringFieldScript.Factory
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, leafSearchLookup, MAX_VALUES
-
Constructor Summary
ConstructorDescriptionStringFieldScript(String fieldName, Map<String,Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
resultsForDoc(int docId)
Execute the script for the provideddocId
.void
Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromSource, execute, extractFromSource, getDoc, getParams, setDocument
-
Field Details
-
MAX_CHARS
public static final long MAX_CHARSThe maximum number of chars a script should be allowed to emit.- See Also:
- Constant Field Values
-
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
-
resultsForDoc
Execute the script for the provideddocId
.- Returns:
- a mutable
List
that contains the results of the script and will be modified the next time you call resultsForDoc(int).
-
runForDoc
-
emitFromObject
- Specified by:
emitFromObject
in classAbstractFieldScript
-
emit
-