4.3.2 修改文档
@Test
public void updateDoc() throws IOException{
Map<String, Object> doc = new HashMap<>();
doc.put("name","长大三");
String docId = "1";
UpdateRequest request = new UpdateRequest(index,type,docId);
request.doc(doc);
UpdateResponse update = client.update(request, RequestOptions.DEFAULT);
System.out.println(update.getResult().toString())
}
4.3.3 删除文档
@Test
public void deleteDoc(){
DeleteRequest request = new DeleteRequest(index,type,"1");
DeleteResponse resp = client.delete(request, ResquestOptions.DEFAULT);
System.out.println(resp.getResult().toString());
}