RestHighLevelClient判断index是否存在

上传:tingajava 浏览: 277 推荐: 0 文件:PDF 大小:19.79KB 上传时间:2021-01-16 18:55:25 版权申诉
判断Index是否存在版本以6.4.2为准,6.2.1api不一样 public boolean indexExists(String indexName) { GetIndexRequest request = new GetIndexRequest(); request.indices(indexName); try { return rhlClient.indices().exists(request, RequestOptions.DEFAULT);
上传资源
用户评论