涉及VID的查询问题

  • 场景:目前有两个节点,tag 类型都是A,VID分别为“xxx-1”和“xxx-2”,然后图中还有其他节点与这两个点连接。现在想要尝试获得这两个节点,想使用以下语句:
match (v:A) where id(v) contains "xxx" return v limit 10;
  • 问题:使用上述语句后报错
[ERROR (-1005)]: Scan vertices or edges need to specify a limit number, or limit number can not push down.

所以目前如果想要通过VID去做一些数值的筛选,是不支持的吗?还是说有其他的解决办法呢?

如果是找VID的话,用法不太对。参加文档

那也就是说只能精准匹配,得提前知道完整vid,如果我想做这种模糊匹配,目前暂不支持哇?

对属性可以 contains

(root@nebula) [nba]> match (v) where v.player.name contains "T" return v
+-------------------------------------------------------------------------------------------------------------+
| v                                                                                                           |
+-------------------------------------------------------------------------------------------------------------+
| ("Tracy McGrady" :player{age: 39, name: "Tracy McGrady"})                                                   |
| ("Tony Parker" :player{age: 36, name: "Tony Parker"})                                                       |
| ("Tim Duncan" :player{age: 42, name: "Tim Duncan"} :bachelor{name: "Tim Duncan", speciality: "psychology"}) |
| ("Tiago Splitter" :player{age: 34, name: "Tiago Splitter"})                                                 |
| ("Klay Thompson" :player{age: 29, name: "Klay Thompson"})                                                   |
+-------------------------------------------------------------------------------------------------------------+
Got 5 rows (time spent 13043/13520 us)

Fri, 21 Apr 2023 14:57:34 CST

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