-, : MongoDb _id , .
1. "[...], if the mongod receives a document to insert that does not contain an _id field, mongod will add the _id field that holds an ObjectId. [...]"
, location_id . location_id, ? , .
, location MyCollection location_id .
, . location_id MyCollection , , MyCollection
Locations.find({location_id: <the_location_id>})
, , , ?
, MyCollection. , , , . 40.000 , , , 100? , .
lat, lon (Locations, MyCollection)?
, , MyCollection (). MongoDb. , , MyCollection.
- :
Locations.find({lat: {$gt: <x>-a, $lt: <x>+a}, lon: {$gt: <y>-b, $lt: <y>+b}}, function(locations){ ... });
, .