TinkerPop 3: Gremlin query to group count by edge direction
By : spacebar
Date : March 29 2020, 07:55 AM
seems to work fine You can do this nicely with project step: code :
gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().has('name','marko').
project('out','in').
by(outE().count()).
by(inE().count())
==>[out:3,in:0]
gremlin> g.V().has('name','marko').as('out','in').
select('out','in').
by(outE().count()).
by(inE().count())
==>[out:3,in:0]
|
Fetch outgoing edge property value between two vertices in scala gremlin
By : Сергей Кучер
Date : March 29 2020, 07:55 AM
To fix this issue Apologies for not being able to answer this in your comments on the previous question you asked. I think what you are looking for is: code :
graph.traversal().V()
.hasLabel("A").outE("test").as("x").otherV()
.hasLabel("B").select("x").properties("name");
graph.traversal().V()
.hasLabel("A").outE("test").as("x").otherV()
.hasLabel("B").select("x").values("name");
graph.traversal().V().hasLabel(A).outE("test").outV().hasLabel(B).properties("name").headOption()
|
Gremlin Java : Get Vertices by max Edge count
By : wunian
Date : March 29 2020, 07:55 AM
hop of those help? I am not sure if I understood your question correctly, but it sounds like you just want to filter all users based on their number of outgoing edges with the label knows. In that case you can directly start at the User vertices and filter them based on the number of their KNOWS edges instead of doing a groupCount: code :
g.V().hasLabel('User').where(outE('KNOWS').count().is(gt(10)))
|
How to perform cross join on different vertices in Gremlin/Tinkerpop
By : Jen Ifer
Date : March 29 2020, 07:55 AM
|
Tinkerpop/gremlin merge vertices (and edges)
By : Jagan G
Date : March 29 2020, 07:55 AM
wish of those help Alright, as mentioned in the comments above, you're going to do the matching in OLTP. That means you'll likely have a concrete entry point. Let's make up a simple sample graph:
|