Docs 主页 → 开发应用程序 → MongoDB Manual
planCacheListFilters
定义
planCacheListFilters
列出与collection的 查询结构 关联的 索引筛选器 。
该命令具有以下语法:
db.runCommand( { planCacheListFilters: <collection> } ) planCacheListFilters
命令具有以下字段:字段类型说明planCacheListFilters
字符串集合的名称。comment
注意到
可选。用户提供的待附加到该命令的注释。设置后,该注释将与该命令的记录一起出现在以下位置:
mongod 日志消息,位于
attr.command.cursor.comment
字段中。command.comment
字段中的数据库分析器输出。currentOp
输出,在command.comment
字段。
注释可以是任何有效的 BSON 类型(字符串、整型、对象、数组等)。
必需的访问权限
用户必须具有包括planCacheIndexFilter
操作的访问权限。
输出
planCacheListFilters
命令返回以下形式的文档:
{ "filters" : [ { "query" : <query> "sort" : <sort>, "projection" : <projection>, "indexes" : [ <index1>, ... ] }, ... ], "ok" : 1 }
planCacheListFilters.filters
包含索引筛选器信息的文档数组。
每个文档包含以下字段:
planCacheListFilters.filters.query
与此筛选器关联的查询谓词。尽管
query
显示了用于创建索引筛选器的特定值,但谓词中的值无关紧要。即查询谓词涵盖仅值不同的类似查询。例如,
{ "type": "electronics", "status" : "A" }
的query
谓词涵盖以下查询谓词:{ type: "food", status: "A" } { type: "utensil", status: "D" } 与 和 一起构成了指定索引筛选器的
sort
projection
query
查询结构 。
planCacheListFilters.filters.sort
与此筛选器关联的排序。 可以是空文档。
与 和 一起构成了指定索引筛选器的
query
projection
sort
查询结构 。
planCacheListFilters.filters.projection
与此筛选器关联的投影。可以是空文档。
与 和 一起构成了指定索引筛选器的
query
sort
projection
查询结构 。