find path 查询两个边 ,如何保证个路径这两个边都存在

这个是查询语句
FIND NOLOOP PATH WITH PROP
FROM ‘41271819930412130X’
TO ‘QQ_2030832920’
OVER person_account, account_friend
BIDIRECT
WHERE account_friend.event_num>0
UPTO 4 STEPS
YIELD path AS p| LIMIT 100

现在并不是每条数据都有 account_friend 导致 where的条件查不到数据 ,需要加什么条件保证 每条数据 都有这两个边的数据

find path 不能保证这个,你要写条件应该这样WHERE (account_friend.event_num>0 or account_friend is empty)

这样写会报错 where 条件只能写边的属性过滤

account_friend 不就是边嘛

account_friend 是边 但是 不支持这种写法 会报错

少括号了

加上了 也是报错

你这个版本比较低?

社区的版本 最新的3.8版本

不清楚了,我测了下,我这边ok 的

(root@nebula) [General]> find all path with prop from "x" to "y"  OVER Invest,Employ BIDIRECT WHERE (Invest.stockpercent is empty or Invest.stockpercent >= 0.01) upto 3 steps YIELD path AS p 
+---+
| p |
+---+
+---+
Empty set (time spent 36.22ms/48.786284ms)

Mon, 08 Sep 2025 14:26:57 CST

你这个是过滤边的属性 不是过滤边

还是很感谢你的回答

没太看懂,我觉得 @Reid00 是对的啊,他这里的判断是要么不是这个边,要么如果是这个边就得满足边上的属性要求。

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。