On this page本页内容
planCacheClearFilters
¶Removes index filters on a collection. Although index filters only exist for the duration of the server process and do not persist after shutdown, you can also clear existing index filters with the planCacheClearFilters
command.
Specify the query shape to remove a specific index filter. Omit the query shape to clear all index filters on a collection.
The command has the following syntax:语法如下所示:
The planCacheClearFilters
command has the following field:
planCacheClearFilters |
string | The name of the collection. |
query |
document |
The values in the |
sort |
document | |
projection |
document | |
comment |
any |
A comment can be any valid BSON type (string, integer, object, array, etc).
|
A user must have access that includes the planCacheIndexFilter
action.
The orders
collection contains the following two filters:
The following command removes the second index filter only:
Because the values in the query
predicate are insignificant in determining the query shape, the following command would also remove the second index filter:
The following example clears all index filters on the orders
collection:
See also参阅