Navigation
This version of the manual is no longer supported.

db.collection.validate()

db.collection.validate()
Parameters:
  • full (Boolean) – Optional. Specify true to enable a full validation. MongoDB disables full validation by default because it is a potentially resource intensive operation.

Provides a wrapper around the validate database command. Call the db.collection.validate() method on a collection object, to validate the collection itself. Specify the full option to return full statistics.

The validation operation scans all of the data structures for correctness and returns a single document that describes the relationship between the logical collection and the physical representation of that data.

The output can provide a more in depth view of how the collection uses storage. Be aware that this command is potentially resource intensive, and may impact the performance of your MongoDB instance.