title: RequestError while updating the index in elasticsearch
body: <p>I have a record indexed in the elasticsearch with certain timestamp. I am trying to update the record using the following code (in python):</p>
  
  <pre><code>from elasticsearch import Elasticsearch
  from datetime import datetime
  import pytz
  
  es = Elasticsearch()
  time = datetime.utcnow().replace(tzinfo=pytz.utc)
  msg = {'_id': 1, 'text': 'Hello World'}
  es.index(index='idx', doc_type='dtype', id=msg['_id'], body=msg, timestamp=time, ttl='30d')
  msg['text'] = 'New Message'
  es.update(index='idx', doc_type='dtype', id=msg['_id'], body=msg, timestamp=time, ttl='30d')  
  </code></pre>
  
  <p>And I am getting the following error:</p>
  
  <pre><code>RequestError: TransportError(400, u'ActionRequestValidationException[Validation Failed: 1: script or doc is missing;]')
  </code></pre>
  
  <p>What could be the reason for the same?</p>