Updated on 2022-09-14 GMT+08:00
Deleting Edges in Batches
You can use a specific API provided by GES to delete edges in batches. The sample code is as follows:
public static void deleteBatchEdges(GraphClient graphClient) throws ApiException { // Construct the information of a single edge. DeleteEdgeReq edge = new DeleteEdgeReq(); edge.setSource("46"); edge.setTarget("39"); DeleteEdgeReq edgeWithIndex = new DeleteEdgeReq(); edgeWithIndex.setSource("46"); edgeWithIndex.setTarget("38"); edgeWithIndex.setIndex("8"); // Form the list of edges to be deleted. List<DeleteEdgeReq> edges = new ArrayList<>(); edges.add(edge); edges.add(edgeWithIndex); // Construct a request for deleting edges in batches. DeleteBatchEdgeReq deleteBatchEdgeReq = new DeleteBatchEdgeReq(); deleteBatchEdgeReq.setEdges(edges); // CExecute the request for deleting edges in batches. Map<String, Object> result = graphClient.deleteBatchEdge(deleteBatchEdgeReq); }
Parent topic: Using the Service Plane SDK
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.