So I have posted my issue here. In short, I can't query on Geopoint on my parse-server I get a strange error:
{"code":1,"message":"Internal server error."} (Code: 1, Version: 1.14.4)
Optional("{"code":1,"message":"Internal server error."}")
On the dashboard logs it says something a bit more complex:
2017-05-08T04:06:47.283Z - Uncaught internal server error. { MongoError: error processing query: ns=heroku_r6dg7cvc.CommentaryTree: $and
_created_at $gt new Date(1494130007253)
_rperm $in [ null "*" "a81FrGp2R3" ]
GEONEAR field=location maxdist=7.17619e-07 isNearSphere=1
Sort: {}
Proj: {}
planner returned error: unable to find index for $geoNear query
at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)
at /app/node_modules/mongodb-core/lib/connection/pool.js:489:72
at authenticateStragglers (/app/node_modules/mongodb-core/lib/connection/pool.js:435:16)
at Connection.messageHandler (/app/node_modules/mongodb-core/lib/connection/pool.js:469:5)
at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:321:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:561:20)
name: 'MongoError',
message: 'error processing query: ns=heroku_r6dg7cvc.CommentaryTree: $and\n _created_at $gt new Date(1494130007253)\n _rperm $in [ null "*" "a81FrGp2R3" ]\n GEONEAR field=location maxdist=7.17619e-07 isNearSphere=1\nSort: {}\nProj: {}\n planner returned error: unable to find index for $geoNear query',
waitedMS: 0,
ok: 0,
errmsg: 'error processing query: ns=heroku_r6dg7cvc.CommentaryTree: $and\n _created_at $gt new Date(1494130007253)\n _rperm $in [ null "*" "a81FrGp2R3" ]\n GEONEAR field=location maxdist=7.17619e-07 isNearSphere=1\nSort: {}\nProj: {}\n planner returned error: unable to find index for $geoNear query',
code: 2 } MongoError: error processing query: ns=heroku_r6dg7cvc.CommentaryTree: $and
_created_at $gt new Date(1494130007253)
_rperm $in [ null "*" "a81FrGp2R3" ]
GEONEAR field=location maxdist=7.17619e-07 isNearSphere=1
Sort: {}
Proj: {}
planner returned error: unable to find index for $geoNear query
at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)
at /app/node_modules/mongodb-core/lib/connection/pool.js:489:72
at authenticateStragglers (/app/node_modules/mongodb-core/lib/connection/pool.js:435:16)
at Connection.messageHandler (/app/node_modules/mongodb-core/lib/connection/pool.js:469:5)
at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:321:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:561:20)
After searching for a while, its possible it might be related to this. Where the solution would be the same to the second link, but I don't know how to apply the solution to a parse-server on heroku.
You using the mlab extension on Heroku? Go to MLab and add an index for the geo field on your collection. You don't need to use an API for this, use the MLab dashboard.