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 Tprotected intprotected final MultiPointValues<T> protected final Stringprotected 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 doubleprotected abstract doublebooleanisEmpty()Returnstrueif this field has no values, otherwisefalse.iterator()protected abstract doubleplaneDistance(double x1, double y1, T point) protected abstract TpointOf(double x, double y) protected abstract voidresetCentroidAndBounds(T centroid, T topLeft, T bottomRight) protected abstract voidresetPointAt(int i, T point) voidsetNextDocId(int docId) Set the current document ID.intsize()Returns the number of values this field has.Methods inherited from class org.elasticsearch.script.field.AbstractScriptFieldFactory
toScriptFieldMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.script.field.DocValuesScriptFieldFactory
toScriptDocValuesMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods 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:DocValuesScriptFieldFactorySet the current document ID.- Specified by:
setNextDocIdin interfaceDocValuesScriptFieldFactory- Specified by:
setNextDocIdin interfaceScriptDocValues.Supplier<T extends SpatialPoint>- Throws:
IOException
-
resetPointAt
-
resetCentroidAndBounds
-
getXFrom
-
getYFrom
-
pointOf
-
planeDistance
-
getInternal
- Specified by:
getInternalin interfaceScriptDocValues.Supplier<T extends SpatialPoint>
-
getInternalCentroid
- Specified by:
getInternalCentroidin interfaceScriptDocValues.GeometrySupplier<T extends SpatialPoint,T extends SpatialPoint>
-
getInternalBoundingBox
- Specified by:
getInternalBoundingBoxin interfaceScriptDocValues.GeometrySupplier<T extends SpatialPoint,T extends SpatialPoint>
-
getInternalLabelPosition
- Specified by:
getInternalLabelPositionin interfaceScriptDocValues.GeometrySupplier<T extends SpatialPoint,T extends SpatialPoint>
-
getName
Description copied from interface:FieldReturns the name of this field.- Specified by:
getNamein interfaceField<T extends SpatialPoint>
-
isEmpty
public boolean isEmpty()Description copied from interface:FieldReturnstrueif this field has no values, otherwisefalse.- Specified by:
isEmptyin interfaceField<T extends SpatialPoint>
-
size
public int size()Description copied from interface:FieldReturns the number of values this field has.- Specified by:
sizein interfaceField<T extends SpatialPoint>- Specified by:
sizein interfaceScriptDocValues.Supplier<T extends SpatialPoint>
-
get
-
get
-
iterator
- Specified by:
iteratorin interfaceIterable<T extends SpatialPoint>
-