java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.GeometryFieldScript
Script producing geometries. It generates a unique
Geometry for each document.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptContext<GeometryFieldScript.Factory> static final String[]static final GeometryFieldScript.FactoryFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceFields inherited from class org.elasticsearch.script.DocBasedScript
docReader -
Constructor Summary
ConstructorsConstructorDescriptionGeometryFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionfinal intcount()The number of results produced the last timeAbstractFieldScript.runForDoc(int)was called.protected voidemitFromObject(Object value) final Geometrygeometry()Geometryfrom the last timeAbstractFieldScript.runForDoc(int)was called.static GeometryFieldScript.FactoryleafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) protected voidfinal voidExecute the script for the provideddocId, passing results to theconsumerMethods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, emitValueFromCompositeScript, execute, extractFromSource, getParams, newContext, runForDocMethods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument, source
-
Field Details
-
CONTEXT
-
PARSE_FROM_SOURCE
-
PARAMETERS
-
-
Constructor Details
-
GeometryFieldScript
public GeometryFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, OnScriptError onScriptError, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
leafAdapter
public static GeometryFieldScript.Factory leafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) -
prepareExecute
protected void prepareExecute()- Specified by:
prepareExecutein classAbstractFieldScript
-
runForDoc
Execute the script for the provideddocId, passing results to theconsumer -
geometry
Geometryfrom the last timeAbstractFieldScript.runForDoc(int)was called. -
count
public final int count()The number of results produced the last timeAbstractFieldScript.runForDoc(int)was called. It is 1 if the document exists, otherwise 0. -
emitFromObject
- Specified by:
emitFromObjectin classAbstractFieldScript
-