planCacheListFilters

Definition

  • planCacheListFilters

New in version 2.6.

Lists the index filters associated withquery shapes for a collection.

The command has the following syntax:

  1. db.runCommand( { planCacheListFilters: <collection> } )

The planCacheListFilters command has the following field:

FieldTypeDescriptionplanCacheListFiltersstringThe 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:

  1. {
  2. "filters" : [
  3. {
  4. "query" : <query>
  5. "sort" : <sort>,
  6. "projection" : <projection>,
  7. "indexes" : [
  8. <index1>,
  9. ...
  10. ]
  11. },
  12. ...
  13. ],
  14. "ok" : 1
  15. }
  • planCacheListFilters.filters
  • The array of documents that contain the index filter information.

Each document contains the following fields:

  • planCacheListFilters.filters.query
  • The query predicate associated with this filter. Although thequery 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 querypredicate of { "type": "electronics", "status" : "A" } coversthe following query predicates:

  1. { type: "food", status: "A" }
  2. { type: "utensil", status: "D" }

Together with the sort andthe projection, thequery make up thequery shape for the specified index filter.

  • planCacheListFilters.filters.sort
  • The sort associated with this filter. Can be an empty document.

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 listedindexes and the collectionscan.
  • planCacheListFilters.ok
  • The status of the command.

See also

planCacheClearFilters,planCacheSetFilter