Queries with a where $nearSphere
operator AND a count operator
returns a mongo error with parse-server > 3.0.0.
#5961
Labels
type:bug
Impaired feature or lacking behavior that is likely assumed
Issue Description
On parse-server > 3.0.0, when querying a Class with a Geopoint filtered with $nearSphere and a count operator, mongodb returns an errors which is returned as an
internal server error
by parse-server.Queries
parse-server >= 3.3.0 with
count=1&where={...$nearSphere...
error isMongoError: radius must be a non-negative number
(example query)parse-server >= 3.3.0 with
count=1&where={...$nearSphere...
error iserror: Uncaught internal server error.can't parse extra field: $maxDistance: 0.002525890376357666
(example query)parse-server > 3.0.0 & < 3.3.0 With count=1&where={...$nearSphere... error is
$nearSphere is not allowed inside of a $match aggregation expression
(example query)Works with 3.0.0
Steps to reproduce
Note: This (example query) with a
count=1
in front of thewhere=...
Expected Results
What's in the doc: https://docs.parseplatform.org/rest/guide/#counting-objects
Actual Outcome
Environment Setup
Server
Database
Logs/Trace
Additonal notes:
Related to #5285?
The text was updated successfully, but these errors were encountered: