[TOC]
- MongoDB官方文档中文版
- MongoDB中文手册说明
- MongoDB简介
- 安装 MongoDB
- The mongo Shell
- MongoDB CRUD 操作
- 聚合
- 数据模型
- 事务
- 索引
- 安全
- 安全检查列表
- 启用访问控制
- 身份验证
- 基于角色的访问控制
- TLS / SSL(传输加密)
- 静态加密
- 客户端字段级加密
- 审计
- 网络和配置强化
- 实现字段级别修订
- 安全参考
- 附录
- 变更流
- 复制
- 分片
- 分片键
- 哈希分片
- 范围分片
- 区
- 管理分片区
- 按位置细分数据
- 用于更改SLA或SLO的分层硬件
- 按应用或客户细分数据
- 仅插入工作负载的分布式本地写入
- 管理分片区
- 使用块进行数据分区
- 在分片集群中拆分数据块
- 管理
- 存储
- 存储引擎
- 日志记录
- 管理日志记录
- GridFS
- FAQ:MongoDB 存储
- 存储引擎
- 参考
- 运算符
- 查询与映射运算符
- 更新运算符
- 聚合管道阶段
- 聚合管道操作符
- $abs (aggregation)
- $acos (aggregation)
- $acosh (aggregation)
- $add (aggregation)
- $addToSet (aggregation)
- $allElementsTrue (aggregation)
- $and (aggregation)
- $anyElementTrue (aggregation)
- $arrayElemAt (aggregation)
- $arrayToObject (aggregation)
- $asin (aggregation)
- $asinh (aggregation)
- $atan (aggregation)
- $atan2 (aggregation)
- $atanh (aggregation)
- $avg (aggregation)
- $ceil (aggregation)
- $cmp (aggregation)
- $concat (aggregation)
- $concatArrays (aggregation)
- $cond (aggregation)
- $convert (aggregation)
- $cos (aggregation)
- $dateFromParts (aggregation)
- $dateToParts (aggregation)
- $dateFromString (aggregation)
- $literal (aggregation)
- 查询修饰符
- 数据库命令
- 聚合命令
- 地理空间命令
- 查询和写操作命令
- 查询计划缓存命令
- 认证命令
- 用户管理命令
- 角色管理命令
- 复制命令
- 分片命令
- 会话命令
- 管理命令
- 诊断命令
- 免费监控命令
- 系统事件审计命令
- mongo Shell 方法
- 集合方法
- db.collection.aggregate()
- db.collection.bulkWrite()
- db.collection.copyTo()
- db.collection.count()
- db.collection.countDocuments()
- db.collection.estimatedDocumentCount()
- 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.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.watch()
- db.collection.validate()
- 词汇表
- 默认的MongoDB端口
- 默认的MongoDB读/写关注
- 服务器会话
- MongoDB驱动
- FAQ
- 联系我们
- 更多资料
- [快学Mongo]
- [Mongo问题讨论区]
- [Mongo 驱动使用手册]
- 本书使用 GitBook 发布
索引参考
索引参考
在本页面
mongo
Shell中的索引方法
名称 | 描述 |
---|---|
db.collection.createIndex() | 在集合上建立索引。 |
db.collection.dropIndex() | 删除集合上的指定索引。 |
db.collection.dropIndexes() | 删除集合上的所有索引。 |
db.collection.getIndexes() | 返回描述集合中现有索引的文档数组。 |
db.collection.reIndex() | 重建集合上的所有现有索引。 |
db.collection.totalIndexSize() | 报告集合上的索引使用的总大小。提供围绕输出totalIndexSize 字段的包装器collStats 。 |
cursor.explain() | 报告有关游标的查询执行计划。 |
cursor.hint() | 强制MongoDB对查询使用特定的索引。 |
cursor.max() | 指定游标的排他上限。用于cursor.hint() |
cursor.min() | 指定一个游标的下限值。用于cursor.hint() |
索引数据库命令
名称 | 描述 |
---|---|
createIndexes | 为一个集合构建一个或多个索引。 |
dropIndexes | 从集合中删除索引。 |
compact | 对集合进行碎片整理并重建索引。 |
reIndex | 重建集合上的所有索引。 |
validate | 内部命令,用于扫描集合的数据并为正确性编制索引。 |
geoSearch | 执行使用MongoDB的干草堆索引功能的地理空间查询。 |
checkShardingIndex | 验证分片键索引的内部命令。 |
地理空间查询选择器
名称 | 描述 |
---|---|
$geoWithin | 选择边界GeoJSON几何内的几何。该2dsphere和2D指标支持 $geoWithin 。 |
$geoIntersects | 选择与GeoJSON几何形状相交的几何形状。该2dsphere索引支持 $geoIntersects 。 |
$near | 返回点附近的地理空间对象。需要地理空间索引。该2dsphere和2D指标支持 $near 。 |
$nearSphere | 返回球体上某个点附近的地理空间对象。需要地理空间索引。该2dsphere和2D指标支持 $nearSphere 。 |
索引查询修饰符
名称 | 描述 |
---|---|
$explain | 强制MongoDB报告查询执行计划。请参阅explain() 。 |
$hint | 强制MongoDB使用特定索引。看到hint() |
$max | 指定要在查询中使用的索引的排他上限。请参阅max() 。 |
$min | 指定一个包容性的下限为索引在查询中使用。请参阅min() 。 |
$returnKey | 强制光标只返回索引中包含的字段。 |
Copyright © 上海锦木信息技术有限公司 all right reserved,由 MongoDB汉化小组 提供技术支持文件修订时间: 2020-10-11 20:53:05