[Neo4j] Gremlin syntax for multiple paths in one call
peter.neubauer at neotechnology.com
Tue Oct 4 17:31:04 CEST 2011
Nice one, will change the docs.
Sent from my phone.
On Oct 4, 2011 5:20 PM, "Marko Rodriguez" <okrammarko at gmail.com> wrote:
>> If I want to get the following
> This is the world of split and merge. The syntax for this is not the
sexiest, but as it stands:
> g.v(0)._.copySplit(_().out('Friends'), _().in('Likes')).fairMerge
> copySplit will take what comes into it and copy it to its internal pipes
(in this case, 2 internal pipes). Then fairMerge will, in a round robin
fashion, merge the output of the two internal pipes into a single pipe.
Thus, split the pipeline, then merge it back into a single pipeline.
> For example, over the play TinkerPop graph:
> gremlin> g = TinkerGraphFactory.createTinkerGraph()
> ==>tinkergraph[vertices:6 edges:6]
> gremlin> g.v(1)._.copySplit(_().out('created'),_().out('knows')).fairMerge
> We haven't developed split/merge much. If you have any ideas for syntax,
that'd be great.
> NOTE: If they were both out, then you can simply do:
> Good luck,
> Neo4j mailing list
> User at lists.neo4j.org
More information about the User