更新时间:2022-06-30 GMT+08:00

批量删除点

您可以使用GES提供的接口批量删除点。示例代码如下:
public static void deleteBatchVertice(GraphClient graphClient) throws ApiException 
{
    String movieVertex = "2";
    String userVertex = "100";

    // 构造待删除点id列表
    List<String> vertices = new ArrayList<>();
    vertices.add(movieVertex);
    vertices.add(userVertex);

    // 构造批量删除点请求
    DeleteBatchVertexReq deleteBatchVertexReq = new DeleteBatchVertexReq();
    deleteBatchVertexReq.setVertices(vertices);

    // 执行批量删除点
    Map<String, Object> result = graphClient.deleteBatchVertex(deleteBatchVertexReq); 
}