MongoDB Manual Contents¶
See About MongoDB Documentation for more information about the MongoDB Documentation project, this Manual and additional editions of this text.
- Introduction
- Installation
- The
mongo
Shell - MongoDB CRUD Operations
- Insert Documents
- Query Documents
- Update Documents
- Delete Documents
- Bulk Write Operations
- SQL to MongoDB Mapping Chart
- Read Isolation (Read Concern)
- Write Acknowledgement (Write Concern)
- MongoDB CRUD Concepts
- Aggregation
- Text Search
- Geospatial Queries
- Data Models
- Administration
- Production Notes
- Operations Checklist
- Development Checklist
- Performance
- Configuration and Maintenance
- Data Center Awareness
- MongoDB Backup Methods
- Monitoring for MongoDB
- Indexes
- Storage
- Security
- Security Checklist
- Authentication
- Users
- Authentication Mechanisms
- Enterprise Authentication Mechanisms
- Internal Authentication
- Enforce Keyfile Access Control in a Replica Set
- Enforce Keyfile Access Control in a Replica Set without Downtime
- Deploy Replica Set With Keyfile Access Control
- Enforce Keyfile Access Control in Sharded Cluster
- Enforce Authentication in an Existing Sharded Cluster Without Downtime
- Deploy Sharded Cluster with Keyfile Access Control
- Use x.509 Certificate for Membership Authentication
- Upgrade from Keyfile Authentication to x.509 Authentication
- Enable Auth
- Role-Based Access Control
- Encryption
- Auditing
- Security Hardening
- Implement Field Level Redaction
- Security Reference
- Create a Vulnerability Report
- Replication
- Replica Set Members
- Replica Set Oplog
- Replica Set Data Synchronization
- Replica Set Deployment Architectures
- Replica Set High Availability
- Replica Set Protocol Versions
- Master Slave Replication
- Replica Set Read and Write Semantics
- Replica Set Tutorials
- Replica Set Deployment Tutorials
- Member Configuration Tutorials
- Replica Set Maintenance Tutorials
- Change the Size of the Oplog
- Perform Maintenance on Replica Set Members
- Force a Member to Become Primary
- Resync a Member of a Replica Set
- Configure Replica Set Tag Sets
- Reconfigure a Replica Set with Unavailable Members
- Manage Chained Replication
- Change Hostnames in a Replica Set
- Configure a Secondary’s Sync Target
- Troubleshoot Replica Sets
- Replication Reference
- Sharding
- Sharded Cluster Components
- Shard Keys
- Hashed Sharding
- Ranged Sharding
- Zones
- Data Partitioning with Chunks
- Balancer
- Administration
- Sharding Reference
- Frequently Asked Questions
- Reference
- Operators
- Query and Projection Operators
- Update Operators
- Aggregation Pipeline Operators
- Pipeline Aggregation Stages
- $collStats (aggregation)
- $project (aggregation)
- $match (aggregation)
- $redact (aggregation)
- $limit (aggregation)
- $skip (aggregation)
- $unwind (aggregation)
- $group (aggregation)
- $sample (aggregation)
- $sort (aggregation)
- $geoNear (aggregation)
- $lookup (aggregation)
- $out (aggregation)
- $indexStats (aggregation)
- $facet (aggregation)
- $bucket (aggregation)
- $bucketAuto (aggregation)
- $sortByCount (aggregation)
- $addFields (aggregation)
- $replaceRoot (aggregation)
- $count (aggregation)
- $graphLookup (aggregation)
- Boolean Aggregation Operators
- Set Operators (Aggregation)
- Comparison Aggregation Operators
- Arithmetic Aggregation Operators
- $abs (aggregation)
- $add (aggregation)
- $ceil (aggregation)
- $divide (aggregation)
- $exp (aggregation)
- $floor (aggregation)
- $ln (aggregation)
- $log (aggregation)
- $log10 (aggregation)
- $mod (aggregation)
- $multiply (aggregation)
- $pow (aggregation)
- $sqrt (aggregation)
- $subtract (aggregation)
- $trunc (aggregation)
- String Aggregation Operators
- Text Search Aggregation Operators
- Array Aggregation Operators
- $arrayElemAt (aggregation)
- $arrayToObject (aggregation)
- $concatArrays (aggregation)
- $filter (aggregation)
- $in (aggregation)
- $indexOfArray (aggregation)
- $isArray (aggregation)
- $map (aggregation)
- $objectToArray (aggregation)
- $range (aggregation)
- $reduce (aggregation)
- $reverseArray (aggregation)
- $size (aggregation)
- $slice (aggregation)
- $zip (aggregation)
- Variable Aggregation Operators
- Literal Aggregation Operators
- Date Aggregation Operators
- $dayOfYear (aggregation)
- $dayOfMonth (aggregation)
- $dayOfWeek (aggregation)
- $year (aggregation)
- $month (aggregation)
- $week (aggregation)
- $hour (aggregation)
- $minute (aggregation)
- $second (aggregation)
- $millisecond (aggregation)
- $dateToString (aggregation)
- $isoDayOfWeek (aggregation)
- $isoWeek (aggregation)
- $isoWeekYear (aggregation)
- Conditional Aggregation Operators
- Data Type Aggregation Operators
- Group Accumulator Operators
- Pipeline Aggregation Stages
- Query Modifiers
- Database Commands
- Aggregation Commands
- Geospatial Commands
- Query and Write Operation Commands
- Query Plan Cache Commands
- Authentication Commands
- User Management Commands
- Role Management Commands
- Replication Commands
- Sharding Commands
- addShard
- addShardToZone
- balancerStart
- balancerStatus
- balancerStop
- checkShardingIndex
- cleanupOrphaned
- enableSharding
- flushRouterConfig
- getShardMap
- getShardVersion
- isdbgrid
- listShards
- medianKey
- moveChunk
- movePrimary
- mergeChunks
- removeShard
- removeShardFromZone
- setShardVersion
- shardCollection
- shardingState
- split
- splitChunk
- splitVector
- unsetSharding
- updateZoneKeyRange
- Administration Commands
- clean
- clone
- cloneCollection
- cloneCollectionAsCapped
- collMod
- compact
- connPoolSync
- connectionStatus
- convertToCapped
- copydb
- create
- createIndexes
- currentOp
- drop
- dropDatabase
- dropIndexes
- filemd5
- fsync
- getParameter
- killCursors
- killOp
- listCollections
- listIndexes
- logRotate
- reIndex
- renameCollection
- repairCursor
- repairDatabase
- setFeatureCompatibilityVersion
- setParameter
- shutdown
- touch
- Diagnostic Commands
- System Events Auditing Commands
mongo
Shell Methods- Collection Methods
- db.collection.aggregate()
- db.collection.bulkWrite()
- db.collection.copyTo()
- db.collection.count()
- db.collection.createIndex()
- db.collection.createIndexes()
- db.collection.dataSize()
- db.collection.deleteOne()
- db.collection.deleteMany()
- db.collection.distinct()
- db.collection.drop()
- db.collection.dropIndex()
- db.collection.dropIndexes()
- db.collection.ensureIndex()
- db.collection.explain()
- db.collection.find()
- db.collection.findAndModify()
- db.collection.findOne()
- db.collection.findOneAndDelete()
- db.collection.findOneAndReplace()
- db.collection.findOneAndUpdate()
- db.collection.getIndexes()
- db.collection.getShardDistribution()
- db.collection.getShardVersion()
- db.collection.group()
- db.collection.insert()
- db.collection.insertOne()
- db.collection.insertMany()
- db.collection.isCapped()
- db.collection.latencyStats()
- db.collection.mapReduce()
- db.collection.reIndex()
- db.collection.remove()
- db.collection.renameCollection()
- db.collection.replaceOne()
- db.collection.save()
- db.collection.stats()
- db.collection.storageSize()
- db.collection.totalIndexSize()
- db.collection.totalSize()
- db.collection.update()
- db.collection.updateOne()
- db.collection.updateMany()
- db.collection.validate()
- Cursor Methods
- cursor.addOption()
- cursor.batchSize()
- cursor.close()
- cursor.collation()
- cursor.comment()
- cursor.count()
- cursor.explain()
- cursor.forEach()
- cursor.hasNext()
- cursor.hint()
- cursor.itcount()
- cursor.limit()
- cursor.map()
- cursor.max()
- cursor.maxScan()
- cursor.maxTimeMS()
- cursor.min()
- cursor.next()
- cursor.noCursorTimeout()
- cursor.objsLeftInBatch()
- cursor.pretty()
- cursor.readConcern()
- cursor.readPref()
- cursor.returnKey()
- cursor.showRecordId()
- cursor.size()
- cursor.skip()
- cursor.snapshot()
- cursor.sort()
- cursor.tailable()
- cursor.toArray()
- Database Methods
- db.adminCommand()
- db.cloneCollection()
- db.cloneDatabase()
- db.commandHelp()
- db.copyDatabase()
- db.createCollection()
- db.createView()
- db.currentOp()
- db.dropDatabase()
- db.eval()
- db.fsyncLock()
- db.fsyncUnlock()
- db.getCollection()
- db.getCollectionInfos()
- db.getCollectionNames()
- db.getLastError()
- db.getLastErrorObj()
- db.getLogComponents()
- db.getMongo()
- db.getName()
- db.getPrevError()
- db.getProfilingLevel()
- db.getProfilingStatus()
- db.getReplicationInfo()
- db.getSiblingDB()
- db.help()
- db.hostInfo()
- db.isMaster()
- db.killOp()
- db.listCommands()
- db.loadServerScripts()
- db.logout()
- db.printCollectionStats()
- db.printReplicationInfo()
- db.printShardingStatus()
- db.printSlaveReplicationInfo()
- db.repairDatabase()
- db.resetError()
- db.runCommand()
- db.serverBuildInfo()
- db.serverCmdLineOpts()
- db.serverStatus()
- db.setLogLevel()
- db.setProfilingLevel()
- db.shutdownServer()
- db.stats()
- db.version()
- db.upgradeCheck()
- db.upgradeCheckAllDBs()
- Query Plan Cache Methods
- Bulk Operation Methods
- db.collection.initializeOrderedBulkOp()
- db.collection.initializeUnorderedBulkOp()
- Bulk()
- Bulk.execute()
- Bulk.find()
- Bulk.find.collation()
- Bulk.find.remove()
- Bulk.find.removeOne()
- Bulk.find.replaceOne()
- Bulk.find.updateOne()
- Bulk.find.update()
- Bulk.find.upsert()
- Bulk.getOperations()
- Bulk.insert()
- Bulk.tojson()
- Bulk.toString()
- User Management Methods
- Role Management Methods
- Replication Methods
- Sharding Methods
- sh.getBalancerLockDetails()
- sh.addShard()
- sh.addShardTag()
- sh.addShardToZone()
- sh.addTagRange()
- sh.disableBalancing()
- sh.enableBalancing()
- sh.enableSharding()
- sh.getBalancerHost()
- sh.getBalancerState()
- sh.removeTagRange()
- sh.removeRangeFromZone()
- sh.help()
- sh.isBalancerRunning()
- sh.moveChunk()
- sh.removeShardTag()
- sh.removeShardFromZone()
- sh.setBalancerState()
- sh.shardCollection()
- sh.splitAt()
- sh.splitFind()
- sh.startBalancer()
- sh.status()
- sh.stopBalancer()
- sh.waitForBalancer()
- sh.waitForBalancerOff()
- sh.waitForDLock()
- sh.waitForPingChange()
- sh.updateZoneKeyRange()
- Subprocess Methods
- Object Constructors and Methods
- Connection Methods
- Native Methods
- Collection Methods
- MongoDB Package Components
- Configuration File Options
- MongoDB Server Parameters
- MongoDB Limits and Thresholds
- Explain Results
- System Collections
- Connection String URI Format
- Collation
- MongoDB Wire Protocol
- Log Messages
- Exit Codes and Statuses
- Glossary
- Default MongoDB Port
- Operators
- Release Notes
- Release Notes for MongoDB 3.4
- Release Notes for MongoDB 3.2
- Release Notes for MongoDB 3.0
- Release Notes for MongoDB 2.6
- Release Notes for MongoDB 2.4
- Release Notes for MongoDB 2.2
- Release Notes for MongoDB 2.0
- Release Notes for MongoDB 1.8
- Release Notes for MongoDB 1.6
- Release Notes for MongoDB 1.4
- Release Notes for MongoDB 1.2.x