Package org.elasticsearch.script
Class GeoPointFieldScript
java.lang.Object
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
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
static interface
-
Field Summary
FieldsFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, leafSearchLookup, MAX_VALUES
-
Constructor Summary
ConstructorsConstructorDescriptionGeoPointFieldScript(String fieldName, Map<String,Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
emit(double lat, double lon)
protected void
emitFromObject(Object value)
extractFromSource(String path)
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, emitFromSource, execute, getDoc, getParams, 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
-
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)
-