Package org.elasticsearch.script
Class GeoPointFieldScript
java.lang.Object
org.elasticsearch.script.AbstractFieldScript
org.elasticsearch.script.AbstractLongFieldScript
org.elasticsearch.script.GeoPointFieldScript
public abstract class GeoPointFieldScript extends AbstractLongFieldScript
Script producing geo points. Similarly to what
LatLonDocValuesField does,
it encodes the points as a long value.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeoPointFieldScript.Emitstatic interfaceGeoPointFieldScript.Factorystatic interfaceGeoPointFieldScript.LeafFactory -
Field Summary
Fields Modifier and Type Field Description static ScriptContext<GeoPointFieldScript.Factory>CONTEXTstatic java.lang.String[]PARAMETERSFields inherited from class org.elasticsearch.script.AbstractFieldScript
fieldName, leafSearchLookup, MAX_VALUES -
Constructor Summary
Constructors Constructor Description GeoPointFieldScript(java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx) -
Method Summary
Modifier and Type Method Description protected voidemit(double lat, double lon)voidrunGeoPointForDoc(int doc, java.util.function.Consumer<GeoPoint> consumer)Consumers must copy the emitted GeoPoint(s) if stored.Methods inherited from class org.elasticsearch.script.AbstractLongFieldScript
count, emit, runForDoc, runForDoc, valuesMethods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, execute, extractFromSource, getDoc, getParams, setDocumentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
CONTEXT
-
PARAMETERS
public static final java.lang.String[] PARAMETERS
-
-
Constructor Details
-
GeoPointFieldScript
public GeoPointFieldScript(java.lang.String fieldName, java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext ctx)
-
-
Method Details
-
runGeoPointForDoc
Consumers must copy the emitted GeoPoint(s) if stored. -
emit
protected void emit(double lat, double lon)
-