MongoDB Manual Contents
¶
Install MongoDB
Install MongoDB on Red Hat Enterprise, CentOS, or Fedora Linux
在 Ubuntu 上安装 MongoDB
在 Debian 上安装 MongoDB
在 Linux 上安装 MongoDB
在 OS X 上安装 MongoDB
在 Windows 上安装 MongoDB
Install MongoDB Enterprise
管理
运行时数据库配置
Backup and Recovery Operations for MongoDB
使用
mongodump
and
mongorestore
to Backup and Restore MongoDB Databases
Use Filesystem Snapshots to Backup and Restore MongoDB Databases
在实例之间复制数据库
意外关机后恢复 MongoDB 数据
Backup a Small Sharded Cluster with
mongodump
Create Backup of a Sharded Cluster with Filesystem Snapshots
Create Backup of a Sharded Cluster with Database Dumps
Restore a Single Shard
Restore Sharded Clusters
Schedule Backup Window for Sharded Clusters
Data Center Awareness
Operational Segregation in MongoDB Operations and Deployments
Tag Aware Sharding
Administer and Manage Shard Tags
部署地理分布式副本集
日记
Connect to MongoDB with SSL
Monitor MongoDB with SNMP
Manage
mongod
流程
Rotate Log Files
Monitoring for MongoDB
Analyze Performance of Database Operations
Import and Export MongoDB Data
Linux
ulimit
设置
产品说明
Use Database Commands
MongoDB Tutorials
安全
Security Practices and Management
Access Control
Configure Linux
iptables
Firewall for MongoDB
Configure Windows
netsh
Firewall for MongoDB
Create a Vulnerability Report
Enable Authentication
Create a User Administrator
Add a User to a Database
Generate a Key File
Deploy MongoDB with Kerberos Authentication
User Privilege Roles in MongoDB
system.users
Privilege Documents
Password Hashing Insecurity
Core MongoDB Operations (CRUD)
Read Operations
Write Operations
Write Concern Reference
BSON Documents
ObjectId
GridFS
数据库引用
Create
Read
Update
Delete
Data Modeling
Data Modeling Considerations for MongoDB Applications
Model Embedded One-to-One Relationships Between Documents
Model Embedded One-to-Many Relationships Between Documents
Model Referenced One-to-Many Relationships Between Documents
Model Data for Atomic Operations
Model Tree Structures with Parent References
Model Tree Structures with Child References
Model Tree Structures with an Array of Ancestors
Model Tree Structures with Materialized Paths
Model Tree Structures with Nested Sets
Model Data to Support Keyword Search
聚合
聚合应用框架
聚合应用框架示例
聚合应用框架参考
SQL to Aggregation Framework Mapping Chart
Map-Reduce
Map-Reduce Examples
Perform Incremental Map-Reduce
Troubleshoot the Map Function
Troubleshoot the Reduce Function
Simple Aggregation Methods and Commands
索引
索引概述
索引策略
Create Indexes to Support Your Queries
Use Indexes to Sort Query Results
Ensure Indexes Fit RAM
Create Queries that Ensure Selectivity
索引操作
Create an Index
Create a Compound Index
Create a Unique Index
Create a Sparse Index
Create a Hashed Index
Build Indexes on Replica Sets
Build Indexes in the Background
Remove Indexes
Rebuild Indexes
Monitor and Manage In Progress Index Creation and Building
Return a List of All Indexes
Measure Index Use
Build Old Style Indexes
Geospatial Indexes and Queries
2d
索引
2dsphere
索引
Haystack Indexes
Calculate Distances in a
2d
Index Using Spherical Geometry
2d
Index Internals
Text Search
Create
text
Index on Multiple Fields
Specify a Language for Text Index
Specify
text
Index Name to Avoid Name Length Limit
Create a
text
Index on a Multi-language Collection
Control Results of Text Search with Weights
Limit the Number of Index Entries Scanned for Text Search
Return Text Queries Using Only a
text
索引
复制
Replica Set Fundamental Concepts
Replica Set Architectures and Deployment Patterns
Replica Set Considerations and Behaviors for Applications and Development
写入关注
读取首选项
Replica Set Internals and Behaviors
Master Slave Replication
副本集管理
部署副本集
Convert a Standalone to a Replica Set
向副本集添加成员
Remove Members from Replica Set
Replace a Replica Set Member
Adjust Priority for Replica Set Member
Resync a Member of a Replica Set
部署地理分布式副本集
更改 Oplog 的大小
强制成员成为主成员
Manage Chained Replication
在副本集中更改主机名
Troubleshoot Replica Sets
Add an Arbiter to Replica Set
将次成员转换为仲裁程序
Configure a Delayed Replica Set Member
Configure a Replica Set Member as Hidden
Configure a Non-Voting Replica Set Member
Prevent Replica Set Member from Becoming Primary
Configure a Secondary’s Sync Target
Configure Replica Set Tag Sets
重新配置包含不可用成员的副本集
副本集设置
Replica Set Commands
Replica Set Features and Version Compatibility
分片
Sharded Cluster Overview
Sharded Cluster Architectures
Query Routing in Sharded Clusters
Security Practices for Sharded Clusters
Sharded Cluster Internals
Sharded Cluster Administration
Deploy a Sharded Cluster
Select a Shard Key
Hashed Sharding
Enable Authentication in a Sharded Cluster
View Cluster Configuration
Add Shards to a Cluster
Convert a Replica Set to a Replicated Sharded Cluster
Administer and Manage Shard Tags
Deploy Three Config Servers for Production Deployments
Migrate Config Servers with the Same Hostname
Migrate Config Servers with Different Hostnames
Replace a Config Server
备份群集元数据
Manage Chunks in a Sharded Cluster
Configure Behavior of Balancer Process in Sharded Clusters
Manage Sharded Cluster Balancer
Remove Shards from an Existing Sharded Cluster
Tag Aware Sharding
对分片集合实施唯一键
Shard GridFS Data Store
应用程序开发
MongoDB Drivers and Client Libraries
Optimization Strategies for MongoDB
Optimize Query Performance with Indexes and Projections
Evaluate Performance of Current Operations
Use Capped Collections for Fast Writes and Reads
Capped Collections
Server-side JavaScript
Store a JavaScript Function on the Server
执行两阶段提交
Create Tailable Cursor
Isolate Sequence of Operations
Create an Auto-Incrementing Sequence Field
Limit Number of Elements in an Array after an Update
通过设置 TTL 使集合中的数据过期
The
mongo
Shell
Getting Started with the
mongo
Shell
Data Types in the
mongo
Shell
Access the
mongo
Shell Help Information
Write Scripts for the
mongo
Shell
mongo
Shell Quick Reference
用例
存储日志数据
预聚合报告
分层聚合
产品目录
库存管理
类别层次
元数据和资产管理
存储备注
通过 Django MongoDB Engine 编写 Tumblelog 应用程序
通过 Flask 和 MongoEngine 编写 Tumblelog 应用程序
常见问题
常见问题解答:MongoDB 基础知识
常见问题解答:面向应用程序开发者的 MongoDB
FAQ: The
mongo
Shell
FAQ: Concurrency
常见问题解答:MongoDB 分片
常见问题解答:MongoDB 中的副本集和复制
常见问题解答:MongoDB 存储
FAQ: Indexes
FAQ: MongoDB Diagnostics
参考
Query, Update and Projection Operators
Comparison Query Operators
$all
$gt
$gte
$in
$lt
$lte
$ne
$nin
Logical Query Operators
$or
$and
$not
$nor
Element Query Operators
$exists
$mod
$type
JavaScript Query Operators
$where
$regex
Geospatial Query Operators
$geoWithin
$geoIntersects
$near
$nearSphere
Query Operator Array
$elemMatch (query)
$size
Field Update Operators
$inc
$rename
$setOnInsert
$set
$unset
Array Update Operators
$ (query)
$addToSet
$pop
$pullAll
$pull
$pushAll
$push
$each
$slice
$sort
Bitwise Update Operator
$bit
Isolation Update Operator
$isolated
Projection Operators
$ (projection)
$elemMatch (projection)
$slice (projection)
Meta Query Operator Quick Reference
$comment
$explain
$hint
$maxScan
$max
$min
$orderby
$returnKey
$showDiskLoc
$snapshot
$natural
Database Commands
Aggregation Commands
aggregate
count
distinct
group
mapReduce
Geospatial Commands
geoNear
geoSearch
geoWalk
Query and Write Operation Commands
findAndModify
text
getLastError
getPrevError
resetError
eval
Replication Commands
replSetFreeze
replSetGetStatus
replSetInitiate
replSetMaintenance
replSetReconfig
replSetStepDown
replSetSyncFrom
resync
applyOps
isMaster
getoptime
Sharding Commands
flushRouterConfig
addShard
checkShardingIndex
enableSharding
listShards
removeShard
getShardMap
getShardVersion
setShardVersion
shardCollection
shardingState
unsetSharding
split
splitChunk
splitVector
medianKey
moveChunk
movePrimary
isdbgrid
Administration Commands
renameCollection
copydb
dropDatabase
drop
create
clone
cloneCollection
cloneCollectionAsCapped
closeAllDatabases
convertToCapped
filemd5
dropIndexes
fsync
clean
connPoolSync
compact
collMod
reIndex
setParameter
getParameter
repairDatabase
touch
shutdown
logRotate
Diagnostic Commands
listDatabases
dbHash
driverOIDTest
listCommands
availableQueryOptions
buildInfo
collStats
connPoolStats
dbStats
cursorInfo
dataSize
diagLogging
getCmdLineOpts
netstat
ping
profile
validate
top
indexStats
whatsmyuri
getLog
hostInfo
serverStatus
features
isSelf
Internal Commands
handshake
recvChunkAbort
recvChunkCommit
recvChunkStart
recvChunkStatus
replSetFresh
mapreduce.shardedfinish
transferMods
replSetHeartbeat
replSetGetRBID
migrateClone
replSetElect
writeBacksQueued
writebacklisten
Testing Commands
testDistLockWithSkew
testDistLockWithSyncCluster
captrunc
emptycapped
godinsert
_hashBSONElement
journalLatencyTest
sleep
replSetTest
forceerror
skewClockCommand
configureFailPoint
mongo
Shell Methods
Collection Methods
db.collection.aggregate()
db.collection.count()
db.collection.createIndex()
db.collection.getIndexStats()
db.collection.dataSize()
db.collection.distinct()
db.collection.drop()
db.collection.dropIndexes()
db.collection.dropIndexes()
db.collection.ensureIndex()
db.collection.find()
db.collection.findAndModify()
db.collection.findOne()
db.collection.getIndexes()
db.collection.getShardDistribution()
db.collection.getShardVersion()
db.collection.group()
db.collection.insert()
db.collection.isCapped()
db.collection.mapReduce()
db.collection.reIndex()
db.collection.remove()
db.collection.renameCollection()
db.collection.save()
db.collection.stats()
db.collection.storageSize()
db.collection.totalSize()
db.collection.storageSize()
db.collection.update()
db.collection.validate()
Cursor Methods
cursor.addOption()
cursor.batchSize()
cursor.count()
cursor.explain()
cursor.forEach()
cursor.hasNext()
cursor.hint()
cursor.limit()
cursor.map()
cursor.max()
cursor.min()
cursor.next()
cursor.objsLeftInBatch()
cursor.readPref()
cursor.showDiskLoc()
cursor.size()
cursor.skip()
cursor.snapshot()
cursor.sort()
cursor.toArray()
Database Methods
db.addUser()
db.auth()
db.cloneCollection()
db.cloneDatabase()
db.commandHelp()
db.copyDatabase()
db.createCollection()
db.currentOp()
db.dropDatabase()
db.eval()
db.fsyncLock()
db.fsyncUnlock()
db.getCollection()
db.getCollectionNames()
db.getLastError()
db.getLastErrorObj()
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.removeUser()
db.repairDatabase()
db.resetError()
db.runCommand()
db.serverBuildInfo()
db.serverStatus()
db.setProfilingLevel()
db.shutdownServer()
db.stats()
db.version()
Replication Methods
rs.add()
rs.addArb()
rs.conf()
rs.freeze()
rs.help()
rs.initiate()
rs.reconfig()
rs.remove()
rs.slaveOk()
rs.status()
rs.stepDown()
rs.syncFrom()
Sharding Methods
sh._adminCommand()
sh._checkFullName()
sh._checkMongos()
sh._lastMigration()
sh.addShard()
sh.addShardTag()
sh.addShardTag()
sh.disableBalancing()
sh.enableBalancing()
sh.enableSharding()
sh.getBalancerHost()
sh.getBalancerState()
sh.help()
sh.isBalancerRunning()
sh.moveChunk()
sh.removeShardTag()
sh.setBalancerState()
sh.shardCollection()
sh.splitAt()
sh.splitFind()
sh.startBalancer()
sh.status()
sh.stopBalancer()
sh.waitForBalancer()
sh.waitForBalancerOff()
sh.waitForDLock()
sh.waitForPingChange()
Connection Methods
Mongo.getDB()
Mongo.getReadPrefMode()
Mongo.getReadPrefTagSet()
Mongo.setReadPref()
mongo.setSlaveOk()
Mongo()
connect()
Subprocess Methods
clearRawMongoProgramOutput()
rawMongoProgramOutput()
run()
runMongoProgram()
runProgram()
startMongoProgram()
stopMongoProgram()
stopMongoProgramByPid()
stopMongod()
waitMongoProgramOnPort()
waitProgram()
Native Methods
cat()
cd()
copyDbpath()
resetDbpath()
fuzzFile()
getHostName()
getMemInfo()
hostname()
_isWindows()
listFiles()
load()
ls()
md5sumFile()
mkdir()
pwd()
quit()
rand()
removeFile()
_srand()
SQL to MongoDB Mapping Chart
MongoDB Package Components
mongod
mongos
mongo
mongod.exe
mongos.exe
mongodump
mongorestore
bsondump
mongooplog
mongoimport
mongoexport
mongostat
mongotop
mongosniff
mongoperf
mongofiles
配置文件选项
mongod
Parameters
The
local
数据库
System Collections
Database Profiler Output
Exit Codes and Statuses
MongoDB 限制和阈值
Connection String URI Format
MongoDB Extended JSON
数据库引用
GridFS Reference
词汇表
版本注释
Release Notes for MongoDB 2.4
MongoDB 2.2 发布说明
MongoDB 2.0 发布说明
MongoDB 1.8 发布说明
Release Notes for MongoDB 1.6
Release Notes for MongoDB 1.4
Release Notes for MongoDB 1.2.x
Release Notes for MongoDB 2.6 (Development Series 2.5.x)
Default Write Concern Change
关于 MongoDB 文档
MongoDB Documentation Style and Conventions
MongoDB Documentation Practices and Processes
MongoDB Documentation Organization
Build and Deploy the MongoDB Documentation
Install MongoDB >
MongoDB 手册
2.4
Contents
Install MongoDB
管理
安全
Core MongoDB Operations (CRUD)
Data Modeling
聚合
索引
复制
分片
应用程序开发
The
mongo
Shell
用例
常见问题
参考
版本注释
关于 MongoDB 文档
索引
格式
MongoDB 手册,单个 HTML 页面
MongoDB 手册,PDF 格式
MongoDB 手册,ePub 格式
关于 MongoDB
简介
User Community
MongoDB 主复制
Planet MongoDB
MongoDB Ecosystem
Drivers and Client libraries
C
(
docs
)
C++
(
docs
)
C#
(
docs
)
Erlang
(
docs
)
Haskell
(
docs
)
Java
(
docs
)
JavaScript
(
docs
)
Perl
(
docs
)
PHP
(
docs
)
Python
(
docs
)
Ruby
(
docs
)
Scala
(
docs
)
Tools and Integration
Platform Integration
MongoDB Resources
下载
MongoDB 事件
幻灯片及视频
MongoDB 监控服务
(
docs
)
论坛
博客
下载
驱动
事件
翻译
编辑本页面
GitHub
Report a Problem