Module org.elasticsearch.server
Package org.elasticsearch.script.field
Class PointDocValuesField<T extends SpatialPoint>
java.lang.Object
org.elasticsearch.script.field.AbstractScriptFieldFactory<T>
org.elasticsearch.script.field.PointDocValuesField<T>
- All Implemented Interfaces:
Iterable<T>
,ScriptDocValues.GeometrySupplier<T,
,T> ScriptDocValues.Supplier<T>
,DocValuesScriptFieldFactory
,Field<T>
,ScriptFieldFactory
- Direct Known Subclasses:
GeoPointDocValuesField
public abstract class PointDocValuesField<T extends SpatialPoint>
extends AbstractScriptFieldFactory<T>
implements Field<T>, DocValuesScriptFieldFactory, ScriptDocValues.GeometrySupplier<T,T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BoundingBox<T>
protected final T
protected int
protected final MultiPointValues<T>
protected final String
protected T[]
-
Constructor Summary
ConstructorsConstructorDescriptionPointDocValuesField
(MultiPointValues<T> input, String name, Supplier<T> pointMaker, BoundingBox<T> boundingBox, T[] values) -
Method Summary
Modifier and TypeMethodDescriptiongetInternal
(int index) getName()
Returns the name of this field.protected abstract double
protected abstract double
boolean
isEmpty()
Returnstrue
if this field has no values, otherwisefalse
.iterator()
protected abstract double
planeDistance
(double x1, double y1, T point) protected abstract T
pointOf
(double x, double y) protected abstract void
resetCentroidAndBounds
(T centroid, T topLeft, T bottomRight) protected abstract void
resetPointAt
(int i, T point) void
setNextDocId
(int docId) Set the current document ID.int
size()
Returns the number of values this field has.Methods inherited from class org.elasticsearch.script.field.AbstractScriptFieldFactory
toScriptField
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.script.field.DocValuesScriptFieldFactory
toScriptDocValues
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.script.field.ScriptFieldFactory
toScriptField
-
Field Details
-
input
-
name
-
values
-
count
protected int count -
centroid
-
boundingBox
-
-
Constructor Details
-
PointDocValuesField
public PointDocValuesField(MultiPointValues<T> input, String name, Supplier<T> pointMaker, BoundingBox<T> boundingBox, T[] values)
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesScriptFieldFactory
Set the current document ID.- Specified by:
setNextDocId
in interfaceDocValuesScriptFieldFactory
- Specified by:
setNextDocId
in interfaceScriptDocValues.Supplier<T extends SpatialPoint>
- Throws:
IOException
-
resetPointAt
-
resetCentroidAndBounds
-
getXFrom
-
getYFrom
-
pointOf
-
planeDistance
-
getInternal
- Specified by:
getInternal
in interfaceScriptDocValues.Supplier<T extends SpatialPoint>
-
getInternalCentroid
- Specified by:
getInternalCentroid
in interfaceScriptDocValues.GeometrySupplier<T extends SpatialPoint,
T extends SpatialPoint>
-
getInternalBoundingBox
- Specified by:
getInternalBoundingBox
in interfaceScriptDocValues.GeometrySupplier<T extends SpatialPoint,
T extends SpatialPoint>
-
getInternalLabelPosition
- Specified by:
getInternalLabelPosition
in interfaceScriptDocValues.GeometrySupplier<T extends SpatialPoint,
T extends SpatialPoint>
-
getName
Description copied from interface:Field
Returns the name of this field.- Specified by:
getName
in interfaceField<T extends SpatialPoint>
-
isEmpty
public boolean isEmpty()Description copied from interface:Field
Returnstrue
if this field has no values, otherwisefalse
.- Specified by:
isEmpty
in interfaceField<T extends SpatialPoint>
-
size
public int size()Description copied from interface:Field
Returns the number of values this field has.- Specified by:
size
in interfaceField<T extends SpatialPoint>
- Specified by:
size
in interfaceScriptDocValues.Supplier<T extends SpatialPoint>
-
get
-
get
-
iterator
- Specified by:
iterator
in interfaceIterable<T extends SpatialPoint>
-