【发布时间】:2018-08-23 13:06:51
【问题描述】:
我有以下遍历表明所选顶点有 14 条边标记为“跟随”。
g.V().has('user','email','me@email.com').project('name','email','follow-edges').by('name').by('email').by(outE().hasLabel('follows').project('id','inV').by('id').by('inV'))
这会产生以下结果:
[{
"name": "David",
"email": "me@email.com",
"follow-edges": 14}]
但是当我想投影“跟随”Edge 的 id 和 inV id 时,我只会得到一个结果项。
g.V().has('user','email','david@me.com').project('name','email','follow-edges').by('name').by('email').by(outE().hasLabel('follows').project('edge-id', 'inV-id').by('id').by('inV'))
结果:
[{
"name": "David",
"email": "me@email.com",
"follow-edges": {
"edge-id": "ccc06183-f4ca-410d-9c3c-9d2dfd93f5f0",
"inV-id": "f4703a07-f42d-46f9-86be-7f5440f07f12"
}}]
我期待获得所选顶点的所有“跟随”边的列表。类似于Stephen Mallette at this link给出的答案。
有谁知道为什么这不起作用?
【问题讨论】: