'create(org.elasticsearch.action.admin.indices.create.CreateIndexRequest, org.elasticsearch.client.RequestOptions)' is deprecated 替代方法
时间: 2024-04-30 21:19:32 浏览: 112
最新版windows elasticsearch-7.17.6-windows-x86_64.zip
`create`方法已经被弃用,可以使用`indices().create(CreateIndexRequest request, RequestOptions options)`方法来替代。具体实现如下:
```
IndicesClient indicesClient = restHighLevelClient.indices();
CreateIndexRequest request = new CreateIndexRequest("my_index");
indicesClient.create(request, RequestOptions.DEFAULT);
```
阅读全文