Kan,
if you need to collect results, just empty the two different
traversals into a result List (last statement is for returning it, if
you use http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html

g.addEdge(g.v(1), g.v(2), 'Friends')
==>e[0][1-Friends->2]
gremlin> g.addEdge(g.v(3), g.v(1),'Likes')
==>e[1][3-Likes->1]
gremlin> result = []
gremlin> g.v(1).in('Likes') >> result
==>v[3]
gremlin> g.v(1).out('Friends') >> result
==>v[3]
==>v[2]
gremlin> result
==>v[3]
==>v[2]

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Oct 4, 2011 at 8:20 AM, KanTube <mich...@mkanner.com> wrote:
> If I want to get the following
>
> g.V(0).out('Friends')
>
> and
>
> g.V(0).in('Likes')
>
> in one call what is the best way to do this?
>
> (Marko - thanks in advance of your answer :) )
>
> --
> View this message in context: 
> http://neo4j-community-discussions.438527.n3.nabble.com/Gremlin-syntax-for-multiple-paths-in-one-call-tp3392311p3392311.html
> Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to