Elastica\QueryBuilder\DSL\Aggregation::geo_distance PHP Method

geo_distance() public method

geo distance aggregation.
public geo_distance ( string $name, string $field, string | array $origin ) : Elastica\Aggregation\GeoDistance
$name string the name if this aggregation
$field string the field on which to perform this aggregation
$origin string | array the point from which distances will be calculated
return Elastica\Aggregation\GeoDistance
    public function geo_distance($name, $field, $origin)
    {
        return new GeoDistance($name, $field, $origin);
    }