title: MongoDB Aggregate Framework - Grouping with Multiple Fields in _id
body: <p><em>Before marking this question as a duplicate - please read through. I don't think a sufficiently conclusive and general answer has been given yet, as most questions have focused on specific examples.</em></p>
  
  <p>The MongoDB documentation says that you can specify an aggregate key for the _id value of a $group operation. There are a number of previously answered questions about using MongoDB's aggregate framework to group over multiple fields in this way, i.e:</p>
  
  <pre><code>{$group: {_id:{field_a:'$field_a', field_b:'$field_b'} } }
  </code></pre>
  
  <p>Q: In the most general sense, what does this action do? </p>
  
  <ul>
  <li>If grouping documents by field A condenses any documents sharing the same value of field A into a single document, does grouping by fields A and B condense documents with matching values of both A and B into a single document?</li>
  <li>Is the grouping operation sequential?</li>
  <li>If so, does that imply any level of precedence between 'field_a' and 'field_b' depending on their ordering?</li>
  </ul>