Google Groups

Re: [mongodb-user] Re: unwinding - pairs, triplets ..


A. Jesse Jiryu Davis Apr 18, 2012 8:09 AM
Posted in group: mongodb-user
Yes, please do file a ticket at jira.mongodb.org and tell us how to reproduce this error so we can debug it.

On Wednesday, April 18, 2012 10:52:23 AM UTC-4, Sammaye wrote:
I don't know of any personally however I wouldn't use an unstable alpha build to setup something for production, that'd just be a crazy thing to do.

2.1 is mostly for testing only, if you find a bug it's prolly good to JIRA it.

On 18 April 2012 15:46, Syd <find...@gmail.com> wrote:
And, doing this crashed our system due to memory outage. We are
reverting back to Pig for this operation.

Are there known performance issues with aggregation framework in the
2.1.1-pre unstable branch? Thanks



On Apr 17, 4:43 pm, "A. Jesse Jiryu Davis" <je...@10gen.com> wrote:
> Nice.
>
>
>
> On Tuesday, April 17, 2012 4:12:44 PM UTC-4, Syd wrote:
>
> > Thanks. This is what I was looking for.
>
> > Below code also removes duplicates and same combinations ex. [1,1],
> > ([1,2], [2,1]).
>
> > db.foo.aggregate({$project:{s:'$t',t:'$t'}}, {$unwind:'$t'},
> > {$unwind:'$s'}, {$project:{combination:{0:'$s', 1:'$t', dup: {$cmp:
> > ["$s","$t"] } }}}, {$match: {'combination.dup': {$nin: [0, 1]}}});
>
> > On Apr 17, 11:01 am, "A. Jesse Jiryu Davis" <je...@10gen.com> wrote:
> > > Consider something like this (for all pairs):
>
> > > > db.foo.insert({t:[1,2,3]})
> > > > db.foo.aggregate({$project:{s:'$t',t:'$t'}}, {$unwind:'$t'},
>
> > > {$unwind:'$s'}, {$project:{combination:{0:'$s', 1:'$t'}}})
>
> > > To do triplets, rename 't' to a third name in the first $project clause,
> > > add another $unwind clause, and include the third name in the
> > 'combination'
> > > field in the final $project.
>
> > > On Tuesday, April 17, 2012 9:06:16 AM UTC-4, Syd wrote:
>
> > > > Is there possibility of unwinding based on combinations. For example,
> > I
> > > > would like to unwind all possible pairs (or triplets etc..) from
> > within an
> > > > array instead of single element (which is the default behavior).
>
> > > > Thanks
> > > On Tuesday, April 17, 2012 9:06:16 AM UTC-4, Syd wrote:
>
> > > > Is there possibility of unwinding based on combinations. For example,
> > I
> > > > would like to unwind all possible pairs (or triplets etc..) from
> > within an
> > > > array instead of single element (which is the default behavior).
>
> > > > 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.