/将创建的对象放入文档中 request.doc(JSONValue.toJSONString(user),XContentType.JSON); UpdateResponse updateResponse=restHighLevelClient.update(request,RequestOptions.DEFAULT); System.out.println(updateResponse.status());//更新成功返回OK}