删除索引
概述
dropIndexes
新版本6.0.
当从集合中删除索引且更改流具有将 showExpandedEvents 选项设置为
true
时,将发生dropIndexes
事件。显示扩展事件 选项设置为true
。
描述
字段 | 类型 | 描述 | |||
---|---|---|---|---|---|
_id | 文档 | 一个作为更改流事件标识符的 BSON 对象。此值用作恢复更改流时
有关使用 | |||
clusterTime | 时间戳 | ||||
collectionUUID | UUID | UUID标识发生更改的集合。 新版本6.0. | |||
lsid | document | 与事务关联的会话的标识符。 仅在操作是多文档事务的一部分时才出现。 | |||
ns | document | 受事件影响的作用域(数据库和/或集合)。 | |||
ns.db | string | 事件发生的数据库名。 | |||
ns.coll | string | 事件发生的集合名。 | |||
operationDescription | document | ||||
operationDescription. indexes | array | 一个文档数组,列出操作删除的索引。 新版本6.0. | |||
operationType | string | 更改通知报告的操作类型。 对于这些更改事件,返回 | |||
txnNumber | NumberLong | ||||
wallTime | 数据库操作的服务器日期和时间。 新版本6.0. |
示例
以下示例显示了一个dropIndexes
事件
{ "_id": { <ResumeToken> }, "operationType": "dropIndexes", "clusterTime": <Timestamp> "collectionUUID": <uuid>, "wallTime": <isodate>, "ns": { "db": "test", "coll": "authors" }, "operationDescription": { "indexes": [ { "v": 2, "key": { "name": 1 }, "name": "name_1" } ] } }