title: Java MongoDB : updating multiple documents at a time
body: <p>I have a following schema  </p>
  
  <pre><code>Id:
  date_created:
  vars: {
        NAME:
        VALUE:
        EDITABLE:
        .....
  
  }
  </code></pre>
  
  <ul>
  <li>By definition <code>Id</code> is <code>unique</code> and could be like <code>A, B, C, AA, AB, ....</code></li>
  <li><p>I have over a million documents like these, all <code>unique</code> documents  </p></li>
  <li><p>Lets say I want to update <code>VALUE</code> in <code>vars</code> of subset of <code>documents</code> which qualify the <code>Id</code> provided to me as a <code>list</code>.</p></li>
  </ul>
  
  <p>Using the <a href="http://api.mongodb.org/java/2.8.0/" rel="nofollow">api</a>, I am not sure which api I can use to do multiple document updates qualifying the criteria where <code>{Id: {$in: [A, B, X, Y, ...]}}</code> </p>
  
  <p>Please help</p>