title: Sort MongoDB documents by byte size
body: <p>I would like to know if it is possible to sort a MongoDB collection by the document size measured in bytes/kb. I have been checking out <a href="http://docs.mongodb.org/manual/reference/method/db.collection.stats/" rel="nofollow">db.collection.stats()</a> however this only gives me information about the collection and not the document.</p>