📜  我已经自定义了 elasticsearch 的传输客户端,我想迁移到 RestClient - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:23.711000             🧑  作者: Mango

代码示例1
restHighLevelClient.indexAsync(indexRequest, new ActionListener() {
                @Override
                public void onResponse(IndexResponse indexResponse) {
                    // called when the operation is successfully completed
                }

                @Override
                public void onFailure(Exception e) {
                    // called on failure
                }
            });