Doctrine\MongoDB\Query\Builder::minDistance PHP Method

minDistance() public method

If the query is a geoNear command ({@link Expr::geoNear()} was called), the "minDistance" command option will be set; otherwise, $minDistance will be added to the current expression. If the query uses GeoJSON points, $minDistance will be interpreted in meters. If legacy point coordinates are used, $minDistance will be interpreted in radians.
See also: Expr::minDistance()
See also: http://docs.mongodb.org/manual/reference/command/geoNear/
See also: http://docs.mongodb.org/manual/reference/operator/minDistance/
See also: http://docs.mongodb.org/manual/reference/operator/near/
See also: http://docs.mongodb.org/manual/reference/operator/nearSphere/
public minDistance ( float $minDistance )
$minDistance float
    public function minDistance($minDistance)
    {
        if ($this->query['type'] === Query::TYPE_GEO_NEAR) {
            $this->query['geoNear']['options']['minDistance'] = $minDistance;
        } else {
            $this->expr->minDistance($minDistance);
        }
        return $this;
    }