-
Notifications
You must be signed in to change notification settings - Fork 1.4k
$near is not allowed inside of a $match aggregation expression #1146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've noticed that the same exception is thrown on I think I've determined this is because both the |
@benargo Did you ever solve this without resulting to not using paginate and count. I have also made a similar observation as you have |
Alas not. However, if you are keen on having length-aware pagination you could always manually create a paginator by slicing the collection. |
Thanks |
Distance operators like If it's okay for you to find the addresses in a specific area without distance sorting you can also use the
|
Description:
MongoDB\Driver\Exception\RuntimeException in
./vendor/mongodb/mongodb/src/Operation/Aggregate.php
line 219:$near is not allowed inside of a $match aggregation expression
Steps To Reproduce:
I'm trying to paginate the results of a geospatial query. If I simply run
->get()
(without pagination) then the results return fine.I've been following the advice given in #371 to run geospatial queries, as you will see below.
File:
VenueListController.php
The text was updated successfully, but these errors were encountered: