title: Is it possible to create multiple collections out of a fork (e.g. bucket or facet)
body: <p>I was wondering if it's possible to create multiple collections (3 to be precise) when using facet and/or bucket. The documentation specifies that facet can't be used with out. So is there an alternative? I'm trying to do something like the following:</p>
  
  <ol>
  <li>Split document in 3 categories <em>(bucket / facet ???)</em></li>
  <li>With these categories get an avg of some value</li>
  <li>Output the query to 3 different collections, each collection have the name of the category</li>
  </ol>
  
  <p>I have the following atm, which groups and filters everything, but if I'm using <em>$out</em>, it can only export to one document (so I got rid of $out)</p>
  
  <pre><code>db.getCollection('metingen').aggregate(
      [
          {
              $unwind: "$parameters"
          },
          {
              $group: {
                  _id : { 
                      uur: { $hour: "$tijdstip" },            
                      locatie: { 
                          $map: { 
                              input: "$loc.coordinates",
                              in: { 
                                  $divide: [
                                          { $trunc: { $multiply: [ '$$this', 1000 ] }}, 
                                          1000
                                  ]
                              }                                        
                           }
                      }
                  },
                  gemiddelde: { 
                      $avg: "$parameters.value"
                  }
              }
          },
          {
              $sort: { "_id.uur" : 1 }
          }
      ]
  );
  </code></pre>
  
  <p>The filter value should be something like <em>$parameters.soort</em>, but I haven't added it here, but I experimented with it before. I'm looking for a way to do this in one query only if possible.</p>
  
  <p>Thanks in advance!</p>