title: What's the difference between replaceOne() and updateOne() in MongoDB?
body: <p>MongoDB bulk operations have two options:</p>
  
  <ol>
  <li><p><a href="https://docs.mongodb.org/manual/reference/method/Bulk.find.updateOne/" rel="noreferrer"><strong><code>Bulk.find.updateOne()</code></strong></a></p>
  
  <blockquote>
    <p>Adds a single document update operation to a bulk operations list. The operation can either replace an existing document or update specific fields in an existing document.</p>
  </blockquote></li>
  <li><p><a href="https://docs.mongodb.org/manual/reference/method/Bulk.find.replaceOne/" rel="noreferrer"><strong><code>Bulk.find.replaceOne()</code></strong></a></p>
  
  <blockquote>
    <p>Adds a single document replacement operation to a bulk operations list. Use the <code>Bulk.find()</code> method to specify the condition that determines which document to replace. The <code>Bulk.find.replaceOne()</code> method limits the replacement to a single document.</p>
  </blockquote></li>
  </ol>
  
  <p>According to the documentation, both of these two methods can replace a matching document. Do I understand correctly, that <code>updateOne()</code> is more general purpose method, which can either replace the document exactly like <code>replaceOne()</code> does, or just update its specific fields?</p>