Module org.elasticsearch.server
Class InternalBounds<T extends SpatialPoint>
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.metrics.InternalBounds<T>
- All Implemented Interfaces:
NamedWriteable
,Writeable
,Aggregation
,SpatialBounds<T>
,ToXContent
,ToXContentFragment
- Direct Known Subclasses:
InternalGeoBounds
public abstract class InternalBounds<T extends SpatialPoint>
extends InternalAggregation
implements SpatialBounds<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsFields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, name
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionInternalBounds
(String name, double top, double bottom, Map<String, Object> metadata) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionGet the bottom-right location of the bounding box.protected void
doWriteTo
(StreamOutput out) doXContentBody
(XContentBuilder builder, ToXContent.Params params) finalizeSampling
(SamplingContext samplingContext) Called by the parent sampling context.getProperty
(List<String> path) protected boolean
Signal the framework if the AggregatorReducer phase needs to be called when there is only one InternalAggregation.protected abstract BoundingBox<T>
protected abstract Object
selectCoordinate
(String coordinateString, T cornerPoint) topLeft()
Get the top-left location of the bounding box.Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
canLeadReduction, copyWithRewritenBuckets, equals, forEachBucket, getLeaderReducer, getMetadata, getName, getProperty, getReducer, getType, hashCode, readSize, reducePipelines, sortValue, sortValue, toString, toXContent, writeSize, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getName, getType
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
Methods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContent
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
top
public final double top -
bottom
public final double bottom
-
-
Constructor Details
-
InternalBounds
-
InternalBounds
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteTo
in classInternalAggregation
- Throws:
IOException
-
finalizeSampling
Description copied from class:InternalAggregation
Called by the parent sampling context. Should only ever be called once as some aggregations scale their internal values- Overrides:
finalizeSampling
in classInternalAggregation
- Parameters:
samplingContext
- the current sampling context- Returns:
- new aggregation with the sampling context applied, could be the same aggregation instance if nothing needs to be done
-
mustReduceOnSingleInternalAgg
protected boolean mustReduceOnSingleInternalAgg()Description copied from class:InternalAggregation
Signal the framework if the AggregatorReducer phase needs to be called when there is only one InternalAggregation.- Specified by:
mustReduceOnSingleInternalAgg
in classInternalAggregation
-
getProperty
- Specified by:
getProperty
in classInternalAggregation
-
selectCoordinate
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
doXContentBody
in classInternalAggregation
- Throws:
IOException
-
resolveBoundingBox
-
topLeft
Description copied from interface:SpatialBounds
Get the top-left location of the bounding box.- Specified by:
topLeft
in interfaceSpatialBounds<T extends SpatialPoint>
-
bottomRight
Description copied from interface:SpatialBounds
Get the bottom-right location of the bounding box.- Specified by:
bottomRight
in interfaceSpatialBounds<T extends SpatialPoint>
-