my method like this:
ESUtil.getClient().prepareUpdate("ttl", "doc", "1")
.setScript(new Script("ctx._source.gender = "male""  , ScriptService.ScriptType.INLINE, null, null))
.get();
but the Script class is not in api 1.7 ,?
please help me how can i use script  in 1.7?  i want to update a  doc like this:
"script" : "lookNum=lookNum+1"  ,but  for update in 1.7   , i must  query the result first and then update use UpdateRequest  like this:
lookNum=lookNum+1;
UpdateRequest update=new UpdateRequest();
update.index(index).type(type).id(code);
XContentBuilder xcon=null;
try {
xcon = XContentFactory.jsonBuilder()
.startObject()
.field(upField, lookNum)
.endObject();
} catch (IOException e) {
e.printStackTrace();
}