Class GeoDistanceAggregation

    • Field Detail

      • id

        protected final java.lang.String id
    • Constructor Detail

      • GeoDistanceAggregation

        public GeoDistanceAggregation​(java.lang.String id,
                                      DocumentTypeField field,
                                      GeoPoint pin)
        Creates a new instance of the aggregation.
        Parameters:
        id - the aggregation identifier.
        field - the field to be used to calculate the distance to the center point.
        pin - the center point from which the distance will be calculated.
        Since:
        9.0.0
    • Method Detail

      • addRanges

        public GeoDistanceAggregation addRanges​(Range<java.lang.Double>... ranges)
        Add the given ranges to the aggregation.
        Parameters:
        ranges - the ranges.
        Returns:
        the aggregation.
        Since:
        9.0.0
      • addRanges

        public GeoDistanceAggregation addRanges​(java.util.Collection<Range<java.lang.Double>> ranges)
        Add the given ranges to the aggregation.
        Parameters:
        ranges - the ranges.
        Returns:
        the aggregation.
        Since:
        9.0.0
      • getRanges

        public java.util.List<Range<java.lang.Double>> getRanges()
        Returns the range list.
        Returns:
        the range list.
        Since:
        9.0.0
      • getPin

        public GeoPoint getPin()
        Returns the center point of the aggregation.
        Returns:
        the center point of the aggregation.
        Since:
        9.0.0
      • getId

        public java.lang.String getId()
        Description copied from interface: IAggregation
        Returns the aggregation identifier.
        Specified by:
        getId in interface IAggregation
        Returns:
        the aggregation identifier.