Michael Siegel
unread,Feb 21, 2012, 10:50:25 AM2/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Hi,
Is there a way to use map-reduce to join between collections where the
output of the join involves multiple joined documents with the same
value for the key used? The join examples I’ve found seem to all
involve joining between two collections where there is a 1-1
relationship between documents in the collections. This doesn’t seem
to allow for a more general Cartesian product filtered by the join
condition, since the reduce function can only output one document for
any given key.
For example, say there are two collections:
A, whose documents have fields a and b
B, whose documents have fields b and c
Is there a way to perform an inner join on these two collections, over
field b equality, even if there is a value of b that occurs more than
once in at least one of the input collections? Does this sort of
operation just not fit within the Mongo paradigm?
Thanks,
Michael