title: elasticsearch partial update with python
body: <p>I have a elasticsearch document in the following format. I need to partial update the "x" field and add a python dict in it.   </p>
  
  <pre><code>{
          "_index": "gdata34",
          "_type": "gdat",
          "_id": "328091-72341-118",
          "_version": 1,
          "_score": 1,
          "_source": {
              "d": {
                  "Thursday": {
                      "s": ""
                  },
                  "Email": {
                      "s": ""
                  },
                 "Country": {
                      "s": "US"
                  },
  
              },
              "x": {
                  "Geo": {
                      "s": "45.335428,-118.057133",
                      "g": [
                          -118.057133
                          ,
                          45.335428
                      ]
                  }
              },
            }
          }
  </code></pre>
  
  <p>I tried the following code to update:</p>
  
  <pre><code>from elasticsearch import Elasticsearch, exceptions
  import pprint
  
  
  elasticsearch = Elasticsearch()
  doc = elasticsearch.get(index='gdata34', doc_type='gdat', id='328091-72341-7')
  
  elasticsearch.update(index='gdata34', doc_type='gdat', id='328091-72341-7',
                       body={"script":"ctx._source.x += y",
                             "params":{"y":"z"}
                       }
                       )
  elasticsearch.indices.refresh(index='gdata34')
  new_doc = elasticsearch.get(index='gdata34', doc_type='gdat', id='328091-72341-7')
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>elasticsearch.exceptions.RequestError: TransportError(400, u'ElasticsearchIllegalArgumentException[failed to execute script]; nested: ScriptException[dynamic scripting for [groovy] disabled]; ')
  </code></pre>
  
  <p>What is the right way to do partial update in elasticsearch using python?</p>