请问GET SUBGRAPH语句:是否支持对节点/边的类型 或 属性过过滤呢?

INTERSECT 是语句层的,可以考虑用一些表达式来实现:

(root@nebula) [nba]> with [1,2,3] as a, [3,4,2] as b with size([i in a where i in b | i])>0 as has_intersection return has_intersection
+------------------+
| has_intersection |
+------------------+
| true             |
+------------------+
Got 1 rows (time spent 1476/1793 us)

Tue, 14 Feb 2023 16:39:31 CST

(root@nebula) [nba]> with [1,22,33] as a, [3,4,2] as b with size([i in a where i in b | i])>0 as has_intersection return has_intersection
+------------------+
| has_intersection |
+------------------+
| false            |
+------------------+
Got 1 rows (time spent 1451/1751 us)

感谢,尝试着改写了,过滤条件似乎生效,但发现返回了多个不子通的子图

这个原因是 go 多步的 where 只会应用在最终返回给用户的数据结果上,对拓展不起效 :face_in_clouds:,你可以尝试把 go 1 to n steps 拆分成 go 1 steps …| go 1 steps from $-.id … | …

试了半天没写出来,,,
另外这样只能返回最后一步go涉及的点和边吧,前面步骤涉及的点和边就丢失了,最终无法绘制完整子图?

可以通过管道一直传啊

go from "Tim Duncan" over * where "player" in tags($$) yield id($^) as src1, id($$) as dst1, edge as e1
| go from $-.dst1 over like where like.likeness>30 or $$.team.name is not null yield $-.dst1 as src2, id($$) as dst2, edge as e2, $-.e1 as e1, $-.src1 as src1

感谢回复,尝试这么写,但是返回结果和预期不一致:
原图如下:
image

查询语句:

我期望通过两次go语句,把两跳的边遍历出来,而第二次的where过滤条件:第二条的终点和第一跳的起点不同,是希望返回的edge2排除edge1中的边,最终返回的的edge1似乎不完整,哪怕最后一行只返回edge1,是where条件对edge1数据做了过滤吗,可是我指定的逻辑不是这样的

补充上述的一个case :