title: Es update giving bad request
body: <p>I am trying to update the following document:</p>
  
  <pre><code>$ curl http://192.168.0.108:9200/customer/customer/AVGbTCQ2XioLLLZULBAD?pretty
  {
    "_index" : "customer",
    "_type" : "customer",
    "_id" : "AVGbTCQ2XioLLLZULBAD",
    "_version" : 15,
    "found" : true,
    "_source":{"age":0,"n":"Abhishek Gupta","id":"AVGbTCQ2XioLLLZULBAD"}
  }
  </code></pre>
  
  <p>According to <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html#_scripted_updates" rel="nofollow">update API</a> my update request is:</p>
  
  <pre><code>$ curl -XPOST http://192.168.0.108:9200/customer/customer/AVGbTCQ2XioLLLZULBAD/_update -d '{
  &gt;   "script": {
  &gt;     "inline": "ctx._source.n = name",
  &gt;     "params": {
  &gt;       "name": "Elas"
  &gt;     }
  &gt;   }
  &gt; }'
  {"error":"ActionRequestValidationException[Validation Failed: 1: script or doc is missing;]","status":400}
  </code></pre>
  
  <p>Why I am getting bad request?</p>
  
  <p>Es version details: </p>
  
  <pre><code>$ curl http://192.168.0.108:9200/
  {
    "status" : 200,
    "name" : "Vance Astro",
    "cluster_name" : "dexter-elasticsearch",
    "version" : {
      "number" : "1.7.1",
      "build_hash" : "b88f43fc40b0bcd7f173a1f9ee2e97816de80b19",
      "build_timestamp" : "2015-07-29T09:54:16Z",
      "build_snapshot" : false,
      "lucene_version" : "4.10.4"
    },
    "tagline" : "You Know, for Search"
  }
  </code></pre>