I have an existing collection that I need to convert into a Capped Collection using the method listed:
> db.runCommand({"convertToCapped": "mycoll", size: 100000});
However, the max field is not accepted as a parameter
> db.mycol1.convertToCapped
function (bytes) {
if (!bytes) {
throw "have to specify # of bytes";
}
return this._dbCommand({convertToCapped: this._shortName, size: bytes});
}
Any idea how to set this?