title: $merge doesn't return any output in mongodb pipeline
body: <p>I have a pipeline that looks like this :</p>
  <pre class="lang-js prettyprint-override"><code>[
    {
      &quot;$match&quot;: {
        &quot;_id&quot;: {
          &quot;$oid&quot;: &quot;6295d353fccb2f44c3868f9a&quot;
        }
      }
    },
    {
      &quot;$addFields&quot;: {
        &quot;...&quot;: &quot;...&quot;
      }
    },
    {
      &quot;$addFields&quot;: {
        &quot;...&quot;: &quot;...&quot;
      }
    },
    {
      &quot;$merge&quot;: {
        &quot;into&quot;: &quot;collection&quot;,
        &quot;on&quot;: &quot;_id&quot;,
        &quot;whenMatched&quot;: &quot;replace&quot;
      }
    }
  ]
  </code></pre>
  <p>The goal of the pipeline is to update some documents and to get the final document.</p>
  <p>I implemented this pipeline using the go driver. And i observed that when the <code>$merge</code> stage is used, the pipeline returns an empty cursor. When i remove the <code>$merge</code> stage, the output is fine.</p>
  <p>Does <code>$merge</code> prevent the pipeline from returning any result ? Can we change this behaviour ? Do I have to use a <code>find</code> after the pipeline ?</p>