Package org.elasticsearch.script
Class GeoPointFieldScript
java.lang.Object
org.elasticsearch.script.DocBasedScript
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.AbstractLongFieldScript
org.elasticsearch.script.GeoPointFieldScript
Script producing geo points. Similarly to what
LatLonDocValuesField
does,
it encodes the points as a long value.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ScriptContext<GeoPointFieldScript.Factory>
static final String[]
static final GeoPointFieldScript.Factory
Fields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, MAX_VALUES, sourceLookup
Fields inherited from class org.elasticsearch.script.DocBasedScript
docReader
-
Constructor Summary
ConstructorDescriptionGeoPointFieldScript
(String fieldName, Map<String, Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
emit
(double lat, double lon) protected void
emitFromObject
(Object value) extractFromSource
(String path) static GeoPointFieldScript.Factory
leafAdapter
(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) void
runGeoPointForDoc
(int doc, Consumer<GeoPoint> consumer) Consumers must copy the emitted GeoPoint(s) if stored.Methods inherited from class org.elasticsearch.script.AbstractLongFieldScript
count, emit, runForDoc, runForDoc, values
Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, emitFromCompositeScript, emitFromSource, execute, getParams
Methods inherited from class org.elasticsearch.script.DocBasedScript
docAsMap, field, fields, getDoc, setDocument
-
Field Details
-
CONTEXT
-
PARSE_FROM_SOURCE
-
PARAMETERS
-
-
Constructor Details
-
GeoPointFieldScript
public GeoPointFieldScript(String fieldName, Map<String, Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
leafAdapter
public static GeoPointFieldScript.Factory leafAdapter(Function<SearchLookup, CompositeFieldScript.LeafFactory> parentFactory) -
runGeoPointForDoc
Consumers must copy the emitted GeoPoint(s) if stored. -
extractFromSource
- Overrides:
extractFromSource
in classAbstractFieldScript
-
emitFromObject
- Specified by:
emitFromObject
in classAbstractFieldScript
-
emit
protected final void emit(double lat, double lon)
-