title: Fastest way to remove duplicate documents in mongodb
body: <p>I have approximately 1.7M documents in mongodb (in future 10m+). Some of them represent duplicate entry which I do not want. Structure of document is something like this:</p>
  
  <pre><code>{
      _id: 14124412,
      nodes: [
          12345,
          54321
          ],
      name: "Some beauty"
  }
  </code></pre>
  
  <p>Document is duplicate if it has at <strong>least one node same</strong> as another document with <strong>same name</strong>. What is the fastest way to remove duplicates?</p>