Hope that helps.
Wes
> --
> 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.
>
I don't think that best practice applies the way you're trying to make
it apply. However, say you have a posts collection, and you want to
display the author, and some info about the author, you might consider
storing that extra info in the post, so that you don't have to do two
queries to list posts (one for the posts and one for the authors).
This has the downside of not updating what's displayed on older posts
(automatically, at least) when the author updates their info, but
sometimes that's desired anyway.
Wes
Wes
No, the index is the same; if I understand what you mean.
> 2. If this is a collection
> group {
> name : ""
> members : [],
> posts : [ { date : "" , author : "" , topic : "" }, { date : "" ,
> author : "" , topic : "" } ......]
> }
>
> How to get posts of a particular group name within specific dates ?
> ( i.e. B/n a start date and end date for a given group)
find({"group.name":"", "group.posts.date":{$gt:value, $lt:value}})