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 class
GeoPointFieldScript.Emit
static interface
GeoPointFieldScript.Factory
static interface
GeoPointFieldScript.LeafFactory
-
Field Summary
Fields Modifier and Type Field Description static ScriptContext<GeoPointFieldScript.Factory>
CONTEXT
static java.lang.String[]
PARAMETERS
Fields 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 void
emit(double lat, double lon)
void
runGeoPointForDoc(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, values
Methods inherited from class org.elasticsearch.script.AbstractFieldScript
checkMaxSize, execute, extractFromSource, getDoc, getParams, setDocument
Methods 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)
-