planCacheListFilters
Definition
New in version 2.6.
Lists the index filters associated withquery shapes for a collection.
The command has the following syntax:
- db.runCommand( { planCacheListFilters: <collection> } )
The planCacheListFilters
command has the following field:
FieldTypeDescriptionplanCacheListFilters
stringThe name of the collection.
Returns:Document listing the index filters. SeeOutput.
Required Access
A user must have access that includes theplanCacheIndexFilter
action.
Output
The planCacheListFilters
command returns the document withthe following form:
- {
- "filters" : [
- {
- "query" : <query>
- "sort" : <sort>,
- "projection" : <projection>,
- "indexes" : [
- <index1>,
- ...
- ]
- },
- ...
- ],
- "ok" : 1
- }
Each document contains the following fields:
planCacheListFilters.filters.
query
- The query predicate associated with this filter. Although the
query
shows the specificvalues used to create the index filter, the values in thepredicate are insignificant; i.e. query predicates cover similarqueries that differ only in the values.
For instance, a query
predicate of { "type": "electronics", "status" : "A" }
coversthe following query predicates:
- { type: "food", status: "A" }
- { type: "utensil", status: "D" }
Together with the sort
andthe projection
, thequery
make up thequery shape for the specified index filter.
Together with the query
andthe projection
, thesort
make up thequery shape for the specified index filter.
planCacheListFilters.filters.
projection
- The projection associated with this filter. Can be an emptydocument.
Together with the query
andthe sort
, theprojection
make up thequery shape for the specified index filter.
planCacheListFilters.filters.
indexes
- The array of indexes for this query shape. To choose theoptimal query plan, the query optimizer evaluates only the listed
indexes
and the collectionscan.
See also