## update request
~~~
UpdateRequest request = new UpdateRequest(
"posts",
"1");
~~~
update with a script 更新脚本
```
Map<String, Object> parameters = singletonMap("count", 4);
Script inline = new Script(ScriptType.INLINE, "painless",
"ctx._source.field += params.count", parameters);
request.script(inline);
```