How to query all subdocuments
问题 I'm beginning with MongoDb and nodejs (using mongoose). I have a collection of Stories , each of them can have one or more Tags , it's something like that: { title: "The red fox", content: "The red fox jumps away...", tags: [ { tagname: "fairytale", user: "pippo" }, { tagname: "funny", user: "pluto" }, { tagname: "fox", user: "paperino" } ] }, ... other stories Now I want to make a tag cloud . It means querying Stories for all tags. In a relational world (e.g. MySQL) I would have a Stories