You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Update by scriptedit
The update API allows to update a document based on a script provided:
UpdateRequest updateRequest = new UpdateRequest("ttl", "doc", "1") .script("ctx._source.gender = \"male\""); client.update(updateRequest).get();