title: Bulk update with Python's elasticsearch client
body: <p>I'm attempting to do a bulk update based on state change on a document property. <code>Create</code> works fine but <code>bulk</code> is freaking out. I'm getting an error to the effect of &quot;script or doc is missing&quot; but everything looks good.</p>
  <p>Here is how I am attempting the bulk update:</p>
  <pre class="lang-py prettyprint-override"><code>frequency_cleared = [
      {
          &quot;_id&quot;: result['_id'], 
          &quot;_type&quot;: &quot;the-type&quot;, 
          &quot;_index&quot;: &quot;the-index&quot;, 
          &quot;_source&quot;: result['_source'],
          &quot;_op_type&quot;: 'update'
      } 
      for result in search_results['hits']['hits']
  ]
  </code></pre>
  <p>The reason I'm iterating over my results is that I use an if in my list comprehension but since I'm able to see the results I get back I know that isn't the issue. I can't show results and had to change property names since this is for the company I work at.</p>
  <p>Here is the traceback:</p>
  <pre><code>Elasticsearch.exceptions.RequestError: 
  TransportError(400, 'action_request_validation_exception',
    'Validation Failed: 1: script or doc is missing...') 
  </code></pre>
  <p>The ellipses represent it showing the same error for every element in the list fails.</p>