2017-05-08 8 views
0

그래서 내 문제 here을 게시했습니다.Parse Query near geopoint error

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)

: 그것은 조금 더 복잡한 것을 말한다 대시 보드 로그에

{"code":1,"message":"Internal server error."} (Code: 1, Version: 1.14.4) Optional("{"code":1,"message":"Internal server error."}")

: 즉, 나는 이상한 오류가 내 구문 분석 서버에 GeoPoint의에 쿼리 할 수 ​​없습니다

잠시 후 가능한 검색 결과는 this과 관련 될 수 있습니다. 솔루션은 두 번째 링크와 동일하지만 heroku의 구문 분석 서버에 솔루션을 적용하는 방법을 모르겠습니다.

+0

일부 코드를 게시 할 수 있습니까? –

답변

0

Heroku에서 mlab 확장자를 사용하고 있습니까? MLab로 가서 컬렉션의 지역 필드에 대한 색인을 추가하십시오. 이를 위해 API를 사용할 필요가 없으며 MLab 대시 보드를 사용하십시오.

+0

당신이 도와 줄 수있어 - https://stackoverflow.com/questions/45825239/how-can-i-save-a-parsegeopoint-object-in-mongodb-using-mlab, 큰 도움이 될 것입니다! – urvashi