Class Aggregations
java.lang.Object
org.elasticsearch.search.aggregations.Aggregations
- All Implemented Interfaces:
Iterable<Aggregation>,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
- Direct Known Subclasses:
InternalAggregations
public class Aggregations
extends Object
implements Iterable<Aggregation>, org.elasticsearch.common.xcontent.ToXContentFragment
Represents a set of
Aggregations-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasList()The list ofAggregations.asMap()Returns theAggregations keyed by aggregation name.booleanstatic AggregationsfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)<A extends Aggregation>
AReturns the aggregation that is associated with the specified name.getAsMap()Returns theAggregations keyed by aggregation name.inthashCode()iterator()Iterates over theAggregations.org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)org.elasticsearch.common.xcontent.XContentBuildertoXContentInternal(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)Directly write all the aggregations without their bounding object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
AGGREGATIONS_FIELD
- See Also:
- Constant Field Values
-
aggregations
-
-
Constructor Details
-
Aggregations
-
-
Method Details
-
iterator
Iterates over theAggregations.- Specified by:
iteratorin interfaceIterable<Aggregation>
-
asList
The list ofAggregations. -
asMap
Returns theAggregations keyed by aggregation name. -
getAsMap
Returns theAggregations keyed by aggregation name. -
get
Returns the aggregation that is associated with the specified name. -
equals
-
hashCode
public final int hashCode() -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
toXContentInternal
public org.elasticsearch.common.xcontent.XContentBuilder toXContentInternal(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOExceptionDirectly write all the aggregations without their bounding object. Used by sub-aggregations (non top level aggs)- Throws:
IOException
-
fromXContent
public static Aggregations fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-