地理空间查询仅在Ubuntu中使用NodeJS和Mongoose,MongoDB

时间:2016-04-05 20:17:32

标签: node.js mongodb ubuntu mongoose geometry

我有一个NodeJS服务器Mongodb,Express和Mongoose。我在做一个地理空间查询。我在Mac上本地运行,一切正常。当我将我的整个项目FTP到Ubuntu框中时,我可以运行该项目,但查询失败了:

    { name: 'MongoError',
  message: 'error processing query: ns=crime.crimesTree: GEONEAR  field=location maxdist=0.000156961 isNearSphere=1\nSort: {}\nProj: {}\n planner returned error: unable to find index for $geoNear query',
  waitedMS: 0,
  ok: 0,
  errmsg: 'error processing query: ns=crime.crimesTree: GEONEAR  field=location maxdist=0.000156961 isNearSphere=1\nSort: {}\nProj: {}\n planner returned error: unable to find index for $geoNear query',
  code: 2 }
GET /crimeindex?lat=41.8841661&lon=-87.6411432 500 86.505 ms - 453

我应该提到SAVING到数据库按预期工作

0 个答案:

没有答案