更新时间:2022-06-30 GMT+08:00
边过滤查询
GES提供校验边过滤查询接口,您可以使用该接口查询满足过滤条件边的集合。示例代码如下:
public static void edgeQuery(GraphClient graphClient) throws ApiException { //设置边过滤查询 EdgeFilterQueryReq req = new EdgeFilterQueryReq(); //按label过滤边 List<String> lables = new ArrayList<>(); lables.add("rate"); req.setLabels(lables); //设置offset和limit,限制结果个数 req.setOffset(0); req.setLimit(5); AsyncAPIResp resp = graphClient.edgeQuery(req); String jobId = resp.getJobId(); EdgeQueryJobReq req1 = new EdgeQueryJobReq(); req1.setJobId(jobId); System.out.println(graphClient.queryJobStatus(req1)); }
父主题: 使用业务面SDK