Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 553 Bytes

learning_mongo.md

File metadata and controls

25 lines (16 loc) · 553 Bytes
path title
/learnings/mongodb
Learnings: Mongodb

Table Of Contents

Updating fields of a document in Mongo

db.users.update({"_id": "0000000000001"}, {$set: {role_level: 10}})

Will just update the role_level field in the found record NOT anything else)

<<Learning_Mongo_Geo_Queries>>

Indexing data:

  • 2dsphere index: $geoNear via GeoJson or coordinate pair
  • 2d index: coordinate pair