java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.FilterScript
A script implementation of a query filter.
See
ScriptQueryBuilder
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A factory to construct statefulFilterScript
factories for a specific index.static interface
A factory to constructFilterScript
instances. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ScriptContext<FilterScript.Factory>
The context used to compileFilterScript
factories.static final String[]
Fields inherited from class org.elasticsearch.script.DocBasedScript
docReader
-
Constructor Summary
ConstructorDescriptionFilterScript
(Map<String, Object> params, SearchLookup lookup, DocReader docReader) -
Method Summary
Methods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc
-
Field Details
-
PARAMETERS
-
CONTEXT
The context used to compileFilterScript
factories.
-
-
Constructor Details
-
FilterScript
-
-
Method Details
-
execute
public abstract boolean execute()Returntrue
if the current document matches the filter, orfalse
otherwise. -
getParams
Return the parameters for this script. -
setDocument
public void setDocument(int docid) Set the current document to run the script on next.- Overrides:
setDocument
in classDocBasedScript
-