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 class
static interface
static interface
-
Field Summary
FieldsFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceLookup
Fields 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 TypeMethodDescriptionvoid
emit(boolean v)
protected void
emitFromObject(Object v)
int
falses()
How manyfalse
values were returned for this document.static BooleanFieldScript.Factory
leafAdapter(Function<SearchLookup,CompositeFieldScript.LeafFactory> parentFactory)
void
runForDoc(int docId)
Execute the script for the provideddocId
.void
int
trues()
How manytrue
values were returned for this document.Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, execute, extractFromSource, getParams
Methods 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 manytrue
values were returned for this document. -
falses
public final int falses()How manyfalse
values were returned for this document. -
emitFromObject
- Specified by:
emitFromObject
in classAbstractFieldScript
-
emit
public final void emit(boolean v)
-