摘要:
//准备一个Request对象
IndexRequest request = new IndexRequest(indexName);
request.id(person.getId().toString()); //手动指定ID
request.source(personJson, XContentType.JSON);
//通过 Client 对象执行添加
IndexResponse resp = client.index(request, RequestOptions.DEFAULT); 阅读全文
posted @ 2023-03-08 08:57
VipSoft
阅读(915)
评论(0)
推荐(0)
浙公网安备 33010602011771号