One of the most important feature of MongoDB is Sharding, which makes MongoDB works as cluster and provides larger throughput.

However, I couldn't find any API of vibe.d's MongoDB driver that set shard keys.
http://vibed.org/api/vibe.db.mongo.collection/MongoCollection.ensureIndex

Does any one knows where to specify shard keys?

For reference, Python's MongoEngine provide sharding key specifying API via meta member field of documentation class.

https://mongoengine-odm.readthedocs.org/guide/defining-documents.html#shard-keys

Thanks.