title: ElasticsearchIllegalArgumentException when using update script
body: <p>I am using Bonsai Elastic Search on Heroku and I have a document as follows:</p>
  
  <pre><code>{
     "_index":"myIndex",
     "_type":"result",
     "_id":"1234_is",
     "_version":1,
     "found":true,
     "_source":{
        "query":"is",
        "pubId":1234,
        "counter":1
     }
  }
  </code></pre>
  
  <p>I'm trying to update the counter like this (as per <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-update.html" rel="nofollow">http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-update.html</a>):</p>
  
  <pre><code>curl -XPOST 'http://ELASTICSEARCHINSTANCE:9200/myIndex/result/1234_is/_update' -d '{"script" : "ctx._source.counter+=1"}'
  </code></pre>
  
  <p>But I'm getting the following error:</p>
  
  <pre><code>{
     "error":"ElasticsearchIllegalArgumentException[failed to execute script]; nested: ExpressionScriptCompilationException[Failed to parse expression: ctx._source.counter+=1]; nested: ParseException[ unexpected character '1' at position (21).]; nested: MismatchedTokenException; ",
     "status":400
  }
  </code></pre>