version 0.5.2 is breaking $geoNear aggregation
See original GitHub issueHi, I have the following error with version 0.5.2 when using geo localised queries:
MongoError: $geoNear is only valid as the first stage in a pipeline.
Indeed, the first item in the aggregate query is now “{ $match: { deleted: { ‘$ne’: true } } }” rather than $geoNear.
As a workaround, I’ve overridden the overrideMethods option.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
$geoNear (aggregation) — MongoDB Manual
Outputs documents in order of nearest to farthest from a specified point. Note. Starting in version 4.2, MongoDB removes the limit and num...
Read more >Mongo $geoNear query - incorrect nscanned number and ...
I'm pretty sure that mongodb has a limit of 16 MB on the results of $GeoNear. ... while the results of the geonear...
Read more >Introduction to Python - Cloudmesh Community
9.1.3.13 Aggregation . ... 11.2.0.5.2 AnsiblePlaybook . ... geous to use a newer version of Python, so you can leverage the latest features....
Read more >geoNear aggregation does not deliver the expected results ...
Hi,. I have 2.000.000 gps locations in my collection. I've added a 2dsphere index on the location field. The location field is a...
Read more >Big Data Applications - ResearchGate
You will also need Python version 3.7.1 to run the scripts needed to assamble the ... No grading will be conducted over breaks...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dsanel, sorry, I don’t work on this project and the related customer anymore. So I won’t be able to reproduce easily.
@dsanel I have this issue. It happens when you use
$geoNear
, e.g. like so:My current workaround is to simply disable soft deletes override of
aggregate
methods.As an alternative workaround, it would be cool, if you could disable the softdelete for a single query, instead of for all methods. For instance:
await this.userModel.disableSoftDeletes.aggregate([{
That could also be a “quick fix” to this problem