Package org.elasticsearch.script
Class BooleanFieldScript
java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.BooleanFieldScript
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptContext<BooleanFieldScript.Factory>static final String[]static final BooleanFieldScript.FactoryFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceLookupFields inherited from class org.elasticsearch.script.DocBasedScript
docReader -
Constructor Summary
ConstructorsConstructorDescriptionBooleanFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidemit(boolean v) protected final voidfinal intfalses()How manyfalsevalues were returned for this document.static BooleanFieldScript.FactoryleafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) final voidrunForDoc(int docId) Execute the script for the provideddocId.final voidfinal inttrues()How manytruevalues were returned for this document.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, execute, extractFromSource, getParamsMethods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument
-
Field Details
-
CONTEXT
-
PARSE_FROM_SOURCE
-
PARAMETERS
-
-
Constructor Details
-
BooleanFieldScript
public BooleanFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
leafAdapter
public static BooleanFieldScript.Factory leafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) -
runForDoc
public final void runForDoc(int docId) Execute the script for the provideddocId. -
runForDoc
-
trues
public final int trues()How manytruevalues were returned for this document. -
falses
public final int falses()How manyfalsevalues were returned for this document. -
emitFromObject
- Specified by:
emitFromObjectin classAbstractFieldScript
-
emit
public final void emit(boolean v)
-