I am trying to sort a search by the size of an array, I tried to do the following in mongodb and it worked:
db.getCollection(\'tweet\').aggregate({ $unwind:\'