use of org.elasticsearch.client.Response in project yyl_example by Relucent.
the class ElasticsearchTest method deleteDocument.
// 删除文档
private static void deleteDocument(RestClient client) throws Exception {
Request request = new Request("DELETE", INDEX + "/" + TYPE + "/1");
Response response = client.performRequest(request);
System.out.println(EntityUtils.toString(response.getEntity()));
}
use of org.elasticsearch.client.Response in project yyl_example by Relucent.
the class ElasticsearchTest method getDocument.
// 获取文档
private static void getDocument(RestClient client) throws Exception {
Request request = new Request("GET", INDEX + "/" + TYPE + "/1");
Response response = client.performRequest(request);
System.out.println(EntityUtils.toString(response.getEntity()));
}
Aggregations