Class GeoDistanceAggregation

    • Field Detail

      • id

        protected final String id
    • Constructor Detail

      • GeoDistanceAggregation

        public GeoDistanceAggregation​(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<Double>... ranges)
        Add the given ranges to the aggregation.
        Parameters:
        ranges - the ranges.
        Returns:
        the aggregation.
        Since:
        9.0.0
      • getRanges

        public List<Range<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 String getId()
        Description copied from interface: IAggregation
        Returns the aggregation identifier.
        Specified by:
        getId in interface IAggregation
        Returns:
        the aggregation identifier.