在进行GET SUBGRAPH查询
整幅图的样式
从A点出发
使用这个语句:GET SUBGRAPH WITH PROP 5 STEPS FROM ‘1b765c6ba0980381ed858fbb7cfd8fd9’ BOTH xiangshi_25a94505a630533e48b3ef0aac86d533_18_1710835528718974978_relation YIELD VERTICES AS nodes, EDGES AS relationships;
1b765c6ba0980381ed858fbb7cfd8fd9为A点ID
xiangshi_25a94505a630533e48b3ef0aac86d533_18_1710835528718974978_relation为相识关系类型
查询出的子图,出了选择的点外,其他点不包含自环边,查询结果如下:
但是如果将BOTH 改为IN就能查出自环边
查询语句:GET SUBGRAPH WITH PROP 5 STEPS FROM ‘1b765c6ba0980381ed858fbb7cfd8fd9’ IN xiangshi_25a94505a630533e48b3ef0aac86d533_18_1710835528718974978_relation YIELD VERTICES AS nodes, EDGES AS relationships;
查询结果如下:
而如果是BOTH的情况下,关系类型全选时也能查询出自环边
查询语句如下:GET SUBGRAPH WITH PROP 3 STEPS FROM ‘1b765c6ba0980381ed858fbb7cfd8fd9’ BOTH ganran_25a94505a630533e48b3ef0aac86d533_18_1710835528718974978_relation,kill_cc9fa2904e877fc008ad0e6f0c7c1523_18_1710835528718974978_relation,xiangshi_25a94505a630533e48b3ef0aac86d533_18_1710835528718974978_relation YIELD VERTICES AS nodes, EDGES AS relationships;
ganran_25a94505a630533e48b3ef0aac86d533_18_1710835528718974978_relation为感染关系类型
kill_cc9fa2904e877fc008ad0e6f0c7c1523_18_1710835528718974978_relation为杀害关系类型
查询结果如下:
请问下出现这种情况的原因是什么