for $question in collection("faqs") order by size($question.tags) count $count return { "id" : $count, "faq" : $question.title }
{ "id" : 1, "faq" : "MySQL and NoSQL: Help me to choose the right one " } { "id" : 2, "faq" : "The Next-gen Databases" } { "id" : 3, "faq" : "Redis, CouchDB or Cassandra?" } { "id" : 4, "faq" : "Find CouchDB docs missing an arbitrary field" } { "id" : 5, "faq" : "Full-text search in NoSQL databases" }