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 classBooleanFieldScript.Emitstatic interfaceBooleanFieldScript.Factorystatic interfaceBooleanFieldScript.LeafFactory -
Field Summary
Fields Modifier and Type Field Description static ScriptContext<BooleanFieldScript.Factory>CONTEXTstatic java.lang.String[]PARAMETERSFields 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 voidemit(boolean v)intfalses()How manyfalsevalues were returned for this document.voidrunForDoc(int docId)Execute the script for the provideddocId.voidrunForDoc(int docId, java.util.function.Consumer<java.lang.Boolean> consumer)inttrues()How manytruevalues were returned for this document.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, execute, extractFromSource, getDoc, getParams, setDocumentMethods 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 manytruevalues were returned for this document. -
falses
public final int falses()How manyfalsevalues were returned for this document. -
emit
public final void emit(boolean v)
-