Class Aggregations

    • Field Detail

      • AGGREGATIONS_FIELD

        public static final java.lang.String AGGREGATIONS_FIELD
        See Also:
        Constant Field Values
      • aggregations

        protected java.util.List<? extends Aggregation> aggregations
      • aggregationsAsMap

        protected java.util.Map<java.lang.String,​Aggregation> aggregationsAsMap
    • Constructor Detail

      • Aggregations

        protected Aggregations()
      • Aggregations

        public Aggregations​(java.util.List<? extends Aggregation> aggregations)
    • Method Detail

      • iterator

        public final java.util.Iterator<Aggregation> iterator()
        Iterates over the Aggregations.
        Specified by:
        iterator in interface java.lang.Iterable<Aggregation>
      • asMap

        public final java.util.Map<java.lang.String,​Aggregation> asMap()
        Returns the Aggregations keyed by aggregation name.
      • getAsMap

        public final java.util.Map<java.lang.String,​Aggregation> getAsMap()
        Returns the Aggregations keyed by aggregation name.
      • get

        public final <A extends Aggregation> A get​(java.lang.String name)
        Returns the aggregation that is associated with the specified name.
      • equals

        public final boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toXContentInternal

        public XContentBuilder toXContentInternal​(XContentBuilder builder,
                                                  ToXContent.Params params)
                                           throws java.io.IOException
        Directly write all the aggregations without their bounding object. Used by sub-aggregations (non top level aggs)
        Throws:
        java.io.IOException
      • fromXContent

        public static Aggregations fromXContent​(XContentParser parser)
                                         throws java.io.IOException
        Throws:
        java.io.IOException