public abstract class FilterScript
extends java.lang.Object
ScriptQueryBuilder
.Modifier and Type | Class and Description |
---|---|
static interface |
FilterScript.Factory
A factory to construct stateful
FilterScript factories for a specific index. |
static interface |
FilterScript.LeafFactory
A factory to construct
FilterScript instances. |
Modifier and Type | Field and Description |
---|---|
static ScriptContext<FilterScript.Factory> |
CONTEXT
The context used to compile
FilterScript factories. |
static java.lang.String[] |
PARAMETERS |
Constructor and Description |
---|
FilterScript(java.util.Map<java.lang.String,java.lang.Object> params,
SearchLookup lookup,
org.apache.lucene.index.LeafReaderContext leafContext) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
execute()
Return
true if the current document matches the filter, or false otherwise. |
java.util.Map<java.lang.String,ScriptDocValues<?>> |
getDoc()
The doc lookup for the Lucene segment this script was created for.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParams()
Return the parameters for this script.
|
void |
setDocument(int docid)
Set the current document to run the script on next.
|
public static final java.lang.String[] PARAMETERS
public static final ScriptContext<FilterScript.Factory> CONTEXT
FilterScript
factories.public FilterScript(java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
public abstract boolean execute()
true
if the current document matches the filter, or false
otherwise.public java.util.Map<java.lang.String,java.lang.Object> getParams()
public final java.util.Map<java.lang.String,ScriptDocValues<?>> getDoc()
public void setDocument(int docid)