NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
, Aggregation
, GeoCentroid
public class InternalGeoCentroid extends InternalAggregation implements GeoCentroid
GeoCentroidAggregator
.Aggregation.CommonFields
InternalAggregation.ReduceContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
TYPED_KEYS_DELIMITER
metaData, name
EMPTY_PARAMS
Constructor | Description |
---|---|
InternalGeoCentroid(StreamInput in) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
GeoPoint |
centroid() |
|
long |
count() |
|
static double |
decodeLatitude(long encodedLatLon) |
|
static double |
decodeLongitude(long encodedLatLon) |
|
boolean |
doEquals(java.lang.Object o) |
Opportunity for subclasses to add criteria to the
InternalAggregation.equals(Object)
method for this class. |
protected int |
doHashCode() |
Opportunity for subclasses to the
InternalAggregation.hashCode() for this
class. |
InternalGeoCentroid |
doReduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
|
protected void |
doWriteTo(StreamOutput out) |
|
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
|
static long |
encodeLatLon(double lat,
double lon) |
|
java.lang.Object |
getProperty(java.util.List<java.lang.String> path) |
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
java.lang.String |
toString() |
getMetaData, getName, getType
equals, getMetaData, getName, getProperty, getType, hashCode, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toXContent
isFragment
public InternalGeoCentroid(StreamInput in) throws java.io.IOException
java.io.IOException
public static long encodeLatLon(double lat, double lon)
public static double decodeLatitude(long encodedLatLon)
public static double decodeLongitude(long encodedLatLon)
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class InternalAggregation
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable
public GeoPoint centroid()
centroid
in interface GeoCentroid
public long count()
count
in interface GeoCentroid
public InternalGeoCentroid doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
public java.lang.Object getProperty(java.util.List<java.lang.String> path)
getProperty
in class InternalAggregation
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class InternalAggregation
java.io.IOException
public boolean doEquals(java.lang.Object o)
InternalAggregation
InternalAggregation.equals(Object)
method for this class.
This method can safely cast obj
to the subclass since the
InternalAggregation.equals(Object)
method checks that obj
is the same
class as this
doEquals
in class InternalAggregation
protected int doHashCode()
InternalAggregation
InternalAggregation.hashCode()
for this
class.doHashCode
in class InternalAggregation
public java.lang.String toString()
toString
in class InternalAggregation