Class ParsedAggregation

java.lang.Object
org.elasticsearch.search.aggregations.ParsedAggregation
All Implemented Interfaces:
Aggregation, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment
Direct Known Subclasses:
ParsedCardinality, ParsedGeoBounds, ParsedGeoCentroid, ParsedMultiBucketAggregation, ParsedPercentiles, ParsedScriptedMetric, ParsedSingleBucketAggregation, ParsedSingleValueNumericMetricsAggregation, ParsedStats, ParsedTopHits, ParsedValueCount

public abstract class ParsedAggregation extends Object implements Aggregation, org.elasticsearch.xcontent.ToXContentFragment
An implementation of Aggregation that is parsed from a REST response. Serves as a base class for all aggregation implementations that are parsed from REST.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation

    Aggregation.CommonFields

    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
    Modifier and Type
    Field
    Description
    protected Map<String,Object>
     

    Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation

    TYPED_KEYS_DELIMITER

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    declareAggregationFields(org.elasticsearch.xcontent.AbstractObjectParser<? extends ParsedAggregation,?> objectParser)
     
    protected abstract org.elasticsearch.xcontent.XContentBuilder
    doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    Get the optional byte array metadata that was set on the aggregation
    final String
     
    protected static double
    parseDouble(org.elasticsearch.xcontent.XContentParser parser, double defaultNullValue)
    Parse a token of type XContentParser.Token.VALUE_NUMBER or XContentParser.Token.STRING to a double.
    protected void
     
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation

    getType

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment

    isFragment
  • Field Details

  • Constructor Details

    • ParsedAggregation

      public ParsedAggregation()
  • Method Details

    • declareAggregationFields

      protected static void declareAggregationFields(org.elasticsearch.xcontent.AbstractObjectParser<? extends ParsedAggregation,?> objectParser)
    • getName

      public final String getName()
      Specified by:
      getName in interface Aggregation
      Returns:
      The name of this aggregation.
    • setName

      protected void setName(String name)
    • getMetadata

      public final Map<String,Object> getMetadata()
      Description copied from interface: Aggregation
      Get the optional byte array metadata that was set on the aggregation
      Specified by:
      getMetadata in interface Aggregation
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • doXContentBody

      protected abstract org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Throws:
      IOException
    • parseDouble

      protected static double parseDouble(org.elasticsearch.xcontent.XContentParser parser, double defaultNullValue) throws IOException
      Parse a token of type XContentParser.Token.VALUE_NUMBER or XContentParser.Token.STRING to a double. In other cases the default value is returned instead.
      Throws:
      IOException