ToXContent, ToXContentFragment, AggregationParsedCardinality, ParsedGeoBounds, ParsedGeoCentroid, ParsedMultiBucketAggregation, ParsedPercentiles, ParsedScriptedMetric, ParsedSingleBucketAggregation, ParsedSingleValueNumericMetricsAggregation, ParsedStats, ParsedTopHits, ParsedValueCountpublic abstract class ParsedAggregation extends java.lang.Object implements Aggregation, ToXContentFragment
Aggregation that is parsed from a REST response.
Serves as a base class for all aggregation implementations that are parsed from REST.Aggregation.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
metadata |
TYPED_KEYS_DELIMITEREMPTY_PARAMS| Constructor | Description |
|---|---|
ParsedAggregation() |
| Modifier and Type | Method | Description |
|---|---|---|
protected static void |
declareAggregationFields(ObjectParser<? extends ParsedAggregation,java.lang.Void> objectParser) |
|
protected abstract XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
|
java.util.Map<java.lang.String,java.lang.Object> |
getMetaData() |
Get the optional byte array metadata that was set on the aggregation
|
java.lang.String |
getName() |
|
protected static double |
parseDouble(XContentParser parser,
double defaultNullValue) |
Parse a token of type XContentParser.Token.VALUE_NUMBER or XContentParser.Token.STRING to a double.
|
protected void |
setName(java.lang.String name) |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
getTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFragmentprotected static void declareAggregationFields(ObjectParser<? extends ParsedAggregation,java.lang.Void> objectParser)
public final java.lang.String getName()
getName in interface Aggregationprotected void setName(java.lang.String name)
public final java.util.Map<java.lang.String,java.lang.Object> getMetaData()
AggregationgetMetaData in interface Aggregationpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionprotected abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionprotected static double parseDouble(XContentParser parser, double defaultNullValue) throws java.io.IOException
java.io.IOException