title: MongoError: multi update only works with $ operators while using bulk find and update in node.js
body: <p>Why getting error </p>
  
  <blockquote>
    <p>MongoError: multi update only works with $ operators</p>
  </blockquote>
  
  <p>while using <code>bulk find and update</code> to update multiple document.</p>
  
  <p>Tried :</p>
  
  <pre><code>var bulk = db.collection('users').initializeUnorderedBulkOp();
  
  var emails = ['a@gmail.com', 'b@gmail.com', 'c@gmail.com','d@gmail.com'];
  var allStatus = ['s1', 's2', 's3', ''];
  
  for (var i =0; i&lt; allStatus.length; i++) {
    var query = { email: emails[i], status: { '$ne': allStatus[i] } };
    var updateField = {};
    if(allStatus[i]) {
        updateField = {
          $set: {status: allStatus[i], date: new Date()},
          $push: {
            notes: {note: 'jdf'+i, date: new Date()},
            history: {status: allStatus[i], date: new Date()}
          }
        };
    }
    bulk.find(query).update(updateField);
  }
  
  bulk.execute();
  </code></pre>