dks551
dks551

Reputation: 1113

AWS Neptune find id of all the vertices connected to a particular vertice

I am trying to get ids of all the vertices connected to a particular vertex. Where id is not "id" property, instead its the id of the node (T.id)

g.V().has(T.id, "id1").both("is")
==>v[id2]
==>v[id3]
==>v[id4]

But when I am trying to get only the ids of the vertices I don't get any.

g.V().has(T.id, "id1").both("is").values("id")
g.V().has(T.id, "id1").both("is").id

What I want is something like below:

==>id2
==>id3
==>id4

Upvotes: 1

Views: 727

Answers (1)

noam621
noam621

Reputation: 2856

If I understood you correctly, You can use this:

g.V("id1").both("is").id()

Anyway if you want to get the id you can use id() step

Upvotes: 1

Related Questions