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
Aggregation s. |
Map<String,Aggregation> |
asMap()
Returns the
Aggregation s 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
Aggregation s 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
Aggregation s. |
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()
Aggregation
s.iterator
in interface Iterable<Aggregation>
public List<Aggregation> asList()
Aggregation
s.asList
in interface Aggregations
public Map<String,Aggregation> asMap()
Aggregation
s keyed by map.asMap
in interface Aggregations
public Map<String,Aggregation> getAsMap()
Aggregation
s keyed by map.getAsMap
in interface Aggregations
public <A extends Aggregation> A get(String name)
Aggregations
get
in interface Aggregations
public Object getProperty(String path)
Aggregations
getProperty
in interface Aggregations
path
- 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 ToXContent
IOException
public XContentBuilder toXContentInternal(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
public static InternalAggregations readAggregations(StreamInput in) throws IOException
IOException
public static InternalAggregations readOptionalAggregations(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
Copyright © 2009–2016. All rights reserved.