tagging multiple predicates in an Out() step

39 views
Skip to first unread message

james.j...@gmail.com

unread,
May 4, 2016, 12:13:38 PM5/4/16
to cayley-users
hi..

I try the following query on 30moviedata.nq using the http interface with the latest commit (15ab599):

g.V().Has("name","Casablanca").Out("/film/film/starring").Out("/film/performance/actor").Out(["name","type"], ["name","type"]).All()

and get:

{
"result": [
{
"id": "Humphrey Bogart",
"name": "name",
"type": "name"
},
...
}

I suspect the 'type' result should be "/people/person". Should i file a bug?

thanks

Denys Smirnov

unread,
May 6, 2016, 8:25:22 AM5/6/16
to cayley-users, james.j...@gmail.com
Hi,

I believe that the second argument in Out will not save the node, but the predicate that was traversed to reach the node.

You might want to try something like this instead:

g.V().Has("name","Casablanca").Out("/film/film/starring").Out("/film/performance/actor").Save("name","name").Save("type","type").All()

среда, 4 мая 2016 г., 19:13:38 UTC+3 пользователь james.j...@gmail.com написал:

james.j...@gmail.com

unread,
May 7, 2016, 2:05:18 AM5/7/16
to cayley-users, james.j...@gmail.com
ok.. works for me. Thanks, Denys.
Reply all
Reply to author
Forward
0 new messages