Package org.elasticsearch.script
Class BooleanFieldScript
java.lang.Object
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.BooleanFieldScript
public abstract class BooleanFieldScript extends AbstractFieldScript
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BooleanFieldScript.Emit
static interface
BooleanFieldScript.Factory
static interface
BooleanFieldScript.LeafFactory
-
Field Summary
Fields Modifier and Type Field Description static ScriptContext<BooleanFieldScript.Factory>
CONTEXT
static java.lang.String[]
PARAMETERS
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, leafSearchLookup, MAX_VALUES
-
Constructor Summary
Constructors Constructor Description BooleanFieldScript(java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
Method Summary
Modifier and Type Method Description void
emit(boolean v)
int
falses()
How manyfalse
values were returned for this document.void
runForDoc(int docId)
Execute the script for the provideddocId
.void
runForDoc(int docId, java.util.function.Consumer<java.lang.Boolean> consumer)
int
trues()
How manytrue
values were returned for this document.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, execute, extractFromSource, getDoc, getParams, setDocument
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
CONTEXT
-
PARAMETERS
public static final java.lang.String[] PARAMETERS
-
-
Constructor Details
-
BooleanFieldScript
public BooleanFieldScript(java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
runForDoc
public final void runForDoc(int docId)Execute the script for the provideddocId
. -
runForDoc
public final void runForDoc(int docId, java.util.function.Consumer<java.lang.Boolean> consumer) -
trues
public final int trues()How manytrue
values were returned for this document. -
falses
public final int falses()How manyfalse
values were returned for this document. -
emit
public final void emit(boolean v)
-