Skip to content

Please Add 'distanceField' in mongodb geoNear query #1878

Closed
@Siltaz

Description

@Siltaz

I'm trying to make a geoNear query:

            '$geometry' => [
                'type' => 'Point',
                'coordinates' => [
                    $longitude,
                    $latitude
                ],
            ],
            '$maxDistance' => 2000,
            'distanceField' => 'distance'

and getting an error "invalid argument in geo near query: distanceField"

But MongoDB supports 'distanceField' option. Reference https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear

Please add 'distanceField' in geo near query, this will make this library better !!
And thanks for this amazing library 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs investigationNeed investigation about bugs described in issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions