Closed zvictor closed 11 years ago
I think the the code in the gist is fine. Since we are talking to the same DB, you don't need to go with SmartCollection's mongo adapter.
I also think mapReduce returns the collection name as the result. And You can use SmartCollections to bring back the result to the client/server.
Excelent! =D
I also think mapReduce returns the collection name as the result. And You can use SmartCollections to bring back the result to the client/server.
The data of the created collection will be propagated across mongo instances?
Are you using multiple mongos? I'm not sure about it.
If uses a replSet it should be, If sharded hope not.
Whatever we define mapReduce it has a big issue to overcome: jhoxray/meteor-mongo-extensions#4
I am migrating my application to use Smart Collections and I faced the lack of aggregation support which I had already overcome using a snippet based on meteor-mongo-extensions, so I decided to adapt this extension to work with Smart Collection.
My problem is that it was too easy to do I am afraid I am missing something else, so I created this topic to discuss this matter. Please, tell me if my thought is right.
mapReduce
that saves its result in the db and should beopLog
compliant.Meteor.SmartCollection
to thedistinct
andaggregate
functions that use regular dummy collections should be enough.mapReduce
we have 2 situations.Here my is gist that just binds the smart collections to dummy regular collections.