Class Aggregations
java.lang.Object
org.elasticsearch.search.aggregations.Aggregations
- All Implemented Interfaces:
Iterable<Aggregation>
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
- Direct Known Subclasses:
InternalAggregations
public class Aggregations
extends Object
implements Iterable<Aggregation>, org.elasticsearch.xcontent.ToXContentFragment
Represents a set of
Aggregation
s-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal List<Aggregation>
asList()
The list ofAggregation
s.final Map<String,
Aggregation> asMap()
Returns theAggregation
s keyed by aggregation name.final boolean
static Aggregations
fromXContent
(org.elasticsearch.xcontent.XContentParser parser) final <A extends Aggregation>
AReturns the aggregation that is associated with the specified name.final Map<String,
Aggregation> getAsMap()
Returns theAggregation
s keyed by aggregation name.final int
hashCode()
final Iterator<Aggregation>
iterator()
Iterates over theAggregation
s.org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) org.elasticsearch.xcontent.XContentBuilder
toXContentInternal
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.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, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
AGGREGATIONS_FIELD
- See Also:
-
aggregations
-
-
Constructor Details
-
Aggregations
-
-
Method Details
-
iterator
Iterates over theAggregation
s.- Specified by:
iterator
in interfaceIterable<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
-
hashCode
public final int hashCode() -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
toXContentInternal
public org.elasticsearch.xcontent.XContentBuilder toXContentInternal(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException Directly 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.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-