Class Aggregations
java.lang.Object
org.elasticsearch.search.aggregations.Aggregations
- All Implemented Interfaces:
java.lang.Iterable<Aggregation>
,ToXContent
,ToXContentFragment
- Direct Known Subclasses:
InternalAggregations
public class Aggregations extends java.lang.Object implements java.lang.Iterable<Aggregation>, ToXContentFragment
Represents a set of
Aggregation
s-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<? extends Aggregation>
aggregations
static java.lang.String
AGGREGATIONS_FIELD
-
Constructor Summary
Constructors Constructor Description Aggregations(java.util.List<? extends Aggregation> aggregations)
-
Method Summary
Modifier and Type Method Description java.util.List<Aggregation>
asList()
The list ofAggregation
s.java.util.Map<java.lang.String,Aggregation>
asMap()
Returns theAggregation
s keyed by aggregation name.boolean
equals(java.lang.Object obj)
static Aggregations
fromXContent(XContentParser parser)
<A extends Aggregation>
Aget(java.lang.String name)
Returns the aggregation that is associated with the specified name.java.util.Map<java.lang.String,Aggregation>
getAsMap()
Returns theAggregation
s keyed by aggregation name.int
hashCode()
java.util.Iterator<Aggregation>
iterator()
Iterates over theAggregation
s.XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
XContentBuilder
toXContentInternal(XContentBuilder builder, ToXContent.Params params)
Directly write all the aggregations without their bounding object.
-
Field Details
-
AGGREGATIONS_FIELD
public static final java.lang.String AGGREGATIONS_FIELD- See Also:
- Constant Field Values
-
aggregations
-
-
Constructor Details
-
Method Details
-
iterator
Iterates over theAggregation
s.- Specified by:
iterator
in interfacejava.lang.Iterable<Aggregation>
-
asList
The list ofAggregation
s. -
asMap
Returns theAggregation
s keyed by aggregation name. -
getAsMap
Returns theAggregation
s keyed by aggregation name. -
get
Returns the aggregation that is associated with the specified name. -
equals
public final boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
toXContentInternal
public XContentBuilder toXContentInternal(XContentBuilder builder, ToXContent.Params params) throws java.io.IOExceptionDirectly write all the aggregations without their bounding object. Used by sub-aggregations (non top level aggs)- Throws:
java.io.IOException
-
fromXContent
- Throws:
java.io.IOException
-