parse-server: BadValue Too many geoNear expressions in 2.3.8
Issue Description
All geo queries near, withinMiles etc fail with the error:
Uncaught internal server error. { MongoError: Can't canonicalize query: BadValue Too many geoNear expressions
The same used to work previously under parse version 2.3.0
Steps to reproduce
var query = new Parse.Query("User"); // Or any other clss
var point = new Parse.GeoPoint({
latitude: location.lat || 0,
longitude: location.lon || 0
});
query.withinMiles("location", point, 75);
Expected Results
Should work as it did under version 2.3.0
Actual Outcome
Error on Mongo
Environment Setup
-
Server
- parse-server version (Be specific! Don’t say ‘latest’.) : 2.3.8
- Operating System: OSX Sierra
- Hardware:
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
-
Database
-
MongoDB version: MongoDB shell version: 3.0.12
-
Storage engine: [FILL THIS OUT]
-
Hardware: [FILL THIS OUT]
-
Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
-
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
error: Uncaught internal server error. { MongoError: Can't canonicalize query: BadValue Too many geoNear expressions
at Function.MongoError.create (/Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/cursor.js:197:34)
at /Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
name: 'MongoError',
message: 'Can\'t canonicalize query: BadValue Too many geoNear expressions',
'$err': 'Can\'t canonicalize query: BadValue Too many geoNear expressions',
code: 17287 } MongoError: Can't canonicalize query: BadValue Too many geoNear expressions
at Function.MongoError.create (/Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/cursor.js:197:34)
at /Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
MongoError: Can't canonicalize query: BadValue Too many geoNear expressions
at Function.MongoError.create (/Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/cursor.js:197:34)
at /Users/sramesh/Desktop/code/m2e/cloud/parse-backend/parse/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27 (27 by maintainers)
Commits related to this issue
- Avoid multiple $nears in one query Mongo has a hard limit on 1 $near operation per query. Restructuring to avoid SERVER-13732 should not invalidate a query by creating multiple $near operations. Add... — committed to NotBobTheBuilder/parse-server by NotBobTheBuilder 7 years ago
- Avoid multiple $nears in one query Mongo has a hard limit on 1 $near operation per query. Restructuring to avoid SERVER-13732 should not invalidate a query by creating multiple $near operations. Add... — committed to NotBobTheBuilder/parse-server by NotBobTheBuilder 7 years ago
- Avoid multiple $nears in one query (#3798) Mongo has a hard limit on 1 $near operation per query. Restructuring to avoid SERVER-13732 should not invalidate a query by creating multiple $near operat... — committed to parse-community/parse-server by NotBobTheBuilder 7 years ago
I haven’t had a chance to look at it during the week end