Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1345

Enhance aggregation functionality for fast collection cloning

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 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.

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            stasou@gmail.com Stavros Souvatzis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: