Package org.elasticsearch.script
Class FilterScript
java.lang.Object
org.elasticsearch.script.FilterScript
A script implementation of a query filter.
See
ScriptQueryBuilder.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA factory to construct statefulFilterScriptfactories for a specific index.static interfaceA factory to constructFilterScriptinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ScriptContext<FilterScript.Factory>The context used to compileFilterScriptfactories.static String[] -
Constructor Summary
ConstructorsConstructorDescriptionFilterScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext) -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanexecute()Returntrueif the current document matches the filter, orfalseotherwise.Map<String,ScriptDocValues<?>>getDoc()The doc lookup for the Lucene segment this script was created for.Return the parameters for this script.voidsetDocument(int docid)Set the current document to run the script on next.
-
Field Details
-
PARAMETERS
-
CONTEXT
The context used to compileFilterScriptfactories.
-
-
Constructor Details
-
FilterScript
public FilterScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
-
Method Details
-
execute
public abstract boolean execute()Returntrueif the current document matches the filter, orfalseotherwise. -
getParams
Return the parameters for this script. -
getDoc
The doc lookup for the Lucene segment this script was created for. -
setDocument
public void setDocument(int docid)Set the current document to run the script on next.
-