Similar to DRIVERS-194. Drivers that provide a createCollection or similar helper must support the new createCollection command options added in MongoDB 2.8. Drivers that already accept arbitrary options for these helpers only have to review and adjust documentation. Drivers that have builders or validate all options will have to add explicit support.
See SERVER-16137 for more information.
Since the server does not report an error on an invalid field in the createCollection command, if you want to validate you have to use the listCollections command, e.g.
> db.createCollection('test', {storageEngine: {wiredTiger: {configString: 'block_compressor=zlib'}}}) { "ok" : 1 } > db.runCommand('listCollections') { "collections" : [ { "name" : "system.indexes", "options" : { } }, { "name" : "test", "options" : { "flags" : 1, "storageEngine" : { "wiredTiger" : { "configString" : "block_compressor=zlib" } } } } ], "ok" : 1 }
- depends on
-
CSHARP-1108 Add support for storage options to CreateIndex and CreateCollection
- Closed
-
RUST-155 Support new storage engine options for createCollection.
- Closed
-
PYTHON-792 Update create_collection, create_index, ensure_index documentation for MongoDB 2.8
- Closed
-
RUBY-837 Update create_collection, create_index, ensure_index documentation for MongoDB 2.8
- Closed
-
CDRIVER-471 Add support for storage options to collection creation helper
- Closed
-
SERVER-16137 Validate collection options for all registered storage engines
- Closed
- related to
-
PHPLIB-64 Collection creation method
- Closed
-
DRIVERS-194 add support for storage options to createIndex
- Closed