-
Type: Improvement
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5.3
-
Component/s: None
-
Environment:Rails / Ruby
In mongo console I can clone a collection really fast by using the aggregate method, like this:
db.sourcecollection.aggregate([\{$out: "targetcollection"}])
Unfortunately, $out is not implemented in ruby driver.
The only current way to clone a collection in ruby is by going through the documents. There should be the possibility to run the aggregation with '$out' in the pipeline. There is huge difference in terms of efficiency, especially when dealing with large collections.
Thanks for reading this, i hope to be hearing from you soon.