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.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested 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, nameFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITERFields 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 voiddoWriteTo(StreamOutput out) doXContentBody(XContentBuilder builder, ToXContent.Params params) finalizeSampling(SamplingContext samplingContext) Called by the parent sampling context.getProperty(List<String> path) protected booleanSignal the framework if the AggregatorReducer phase needs to be called when there is only one InternalAggregation.protected abstract BoundingBox<T> protected abstract ObjectselectCoordinate(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, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getName, getTypeMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableNameMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods 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:
doWriteToin classInternalAggregation- Throws:
IOException
-
finalizeSampling
Description copied from class:InternalAggregationCalled by the parent sampling context. Should only ever be called once as some aggregations scale their internal values- Overrides:
finalizeSamplingin 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:InternalAggregationSignal the framework if the AggregatorReducer phase needs to be called when there is only one InternalAggregation.- Specified by:
mustReduceOnSingleInternalAggin classInternalAggregation
-
getProperty
- Specified by:
getPropertyin classInternalAggregation
-
selectCoordinate
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classInternalAggregation- Throws:
IOException
-
resolveBoundingBox
-
topLeft
Description copied from interface:SpatialBoundsGet the top-left location of the bounding box.- Specified by:
topLeftin interfaceSpatialBounds<T extends SpatialPoint>
-
bottomRight
Description copied from interface:SpatialBoundsGet the bottom-right location of the bounding box.- Specified by:
bottomRightin interfaceSpatialBounds<T extends SpatialPoint>
-