I have a NodeJS server Mongodb, Express and Mongoose. I am doing a geospatial query. I am running locally on Mac and everything works fine. When I FTP my ENTIRE project into the Ubuntu box, I can run the project but the queries fail:
{ 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
I should mention that SAVING to the database works as expected