public class InternalAggregations extends Object implements Aggregations, ToXContent, Streamable
Aggregations.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static InternalAggregations |
EMPTY |
EMPTY_PARAMS| Constructor and Description |
|---|
InternalAggregations(List<InternalAggregation> aggregations)
Constructs a new addAggregation.
|
| Modifier and Type | Method and Description |
|---|---|
List<Aggregation> |
asList()
The list of
Aggregations. |
Map<String,Aggregation> |
asMap()
Returns the
Aggregations keyed by map. |
<A extends Aggregation> |
get(String name)
Returns the aggregation that is associated with the specified name.
|
Map<String,Aggregation> |
getAsMap()
Returns the
Aggregations keyed by map. |
Object |
getProperty(List<String> path) |
Object |
getProperty(String path)
Get the value of specified path in the aggregation.
|
Iterator<Aggregation> |
iterator()
Iterates over the
Aggregations. |
static InternalAggregations |
readAggregations(StreamInput in) |
void |
readFrom(StreamInput in) |
static InternalAggregations |
readOptionalAggregations(StreamInput in) |
static InternalAggregations |
reduce(List<InternalAggregations> aggregationsList,
InternalAggregation.ReduceContext context)
Reduces the given lists of addAggregation.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
XContentBuilder |
toXContentInternal(XContentBuilder builder,
ToXContent.Params params)
Directly write all the addAggregation without their bounding object.
|
void |
writeTo(StreamOutput out) |
public static final InternalAggregations EMPTY
public InternalAggregations(List<InternalAggregation> aggregations)
public Iterator<Aggregation> iterator()
Aggregations.iterator in interface Iterable<Aggregation>public List<Aggregation> asList()
Aggregations.asList in interface Aggregationspublic Map<String,Aggregation> asMap()
Aggregations keyed by map.asMap in interface Aggregationspublic Map<String,Aggregation> getAsMap()
Aggregations keyed by map.getAsMap in interface Aggregationspublic <A extends Aggregation> A get(String name)
Aggregationsget in interface Aggregationspublic Object getProperty(String path)
AggregationsgetProperty in interface Aggregationspath - the path to the property in the aggregation treepublic static InternalAggregations reduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context)
aggregationsList - A list of aggregation to reducepublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic XContentBuilder toXContentInternal(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionpublic static InternalAggregations readAggregations(StreamInput in) throws IOException
IOExceptionpublic static InternalAggregations readOptionalAggregations(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionCopyright © 2009–2017. All rights reserved.