{title: "asdf", body: "...", comments: [{body: "...", rating: 3},
{body: "...", rating: 4}]}
Is there currently a way to, or are there plans to allow, query the
collection to get only the embedded comments that match some criteria?
For example, if I wanted to get only the comments with a rating >= 4,
but did not want to get the rest of the post (the title, body, etc.
that is not part of an embedded comment document).
I know that something like find({"comments.rating": {$gte: 4}},
{comments: true}) will run, but it will give me all comments of blog
posts that have any comment with rating >= 4 and not just the comments
that match the query.
Thanks!
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>
Thanks!
On Feb 9, 11:48 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> Not currently, but it is planned.
> See:http://jira.mongodb.org/browse/SERVER-142
>