Skip to main content

Questions tagged [gremlin]

Gremlin is the graph traversal language and virtual machine of Apache TinkerPop™

gremlin
0 votes
1 answer
19 views

Gremlin query to find path of vertices for the common value of vertex but different vertex

I am trying to write a query to find all path between 2 given vertices will give an example to understand my question, here's graph like that, I'm using JanusGraph Vertex_1(id=1, value='Bob', label='...
user17372935's user avatar
0 votes
1 answer
20 views

Tinkerpop vertex property single cardinality is not working

When creating a vertex i explicitly mentioned Cardinality as single still its taking list, not able figure out why. wg.addV("label") .property(VertexProperty.Cardinality.single,"name&...
mmr25's user avatar
  • 93
0 votes
0 answers
34 views

JanusGraph traversal returns Vertex instead of JanusGraphVertex

I'm using Java to connect to JanusGraph 1.0. I'm having trouble understanding why JanusGraph would ever return a Vertex. JanusGraph graph = JanusGraphFactory.open('configfile'); JanusGraphVertex jgv = ...
gph's user avatar
  • 1,216
0 votes
0 answers
18 views

JanusGraph edges from Java do not appear in Gremlin console

I'm running a JanusGraph server and client per the instructions here. I included an argument to expose port 8182 so I can connect to it from a Java application. My Java application just creates a new ...
gph's user avatar
  • 1,216
0 votes
1 answer
22 views

How to get all incoming direct and indirect nodes with edges of a given node

I have a graph like below a->b b->c d->c a->c e->d c->e e->a f->g g->a c->h If i select c, it should return all incoming direct and indirect nodes with edges along the ...
mmr25's user avatar
  • 93
1 vote
2 answers
41 views

Gremlingo stuck while evaluting g.V().hasNext()

I have a piece of code where i evaluate to drop vertices but only if a pre-fetch of g.V().<filters>.hasNext() returns true. Problem is on my subsequent call to fetch the nodes themselves it is ...
Wajih Siddiqui's user avatar
0 votes
1 answer
17 views

Apache TinkerPop Gremlin query language is not getting converted to Neptune-specific steps that are optimized to run on the underlying Neptune engine

I am using explain() API on AWS neptune cluster as below- GraphTraversalSource g = getTraversal(cluster); TraversalExplanation explain = g.V().hasLabel("Users").explain(); System.out....
dishabehrani77's user avatar
0 votes
1 answer
27 views

Gremlin query, get all the nodes 2 - 4 steps from the selected nodes

I would like to retrieve all the nodes that are 2 to 4 steps away from a selected node. My thought was that I could separate the query into two repeat().times(2) step so that I can call them later: ...
Herman Yuen's user avatar
0 votes
0 answers
38 views

Why "Could not locate method: NeptuneGraphTraversal.property()" after addE()?

I'm trying to convert the code from this QA about copying a node from groovy gremlin to nodejs gremlin. One section of that code I've converted like so this.__.select('source').inE().as('e'). select(...
Joseph Summerhays's user avatar
0 votes
0 answers
16 views

Setting constants for usage in math steps with select in gremlin

I have a working js gremlin query for Haversine distance which I am looking to make more composable by setting constants for usage in the math step in some other way than using withSideEffect. The ...
ashissl's user avatar
  • 137
0 votes
1 answer
20 views

Gremlin - can I attach a property to a path?

So my question is, after traversal, I have got several paths, a path looks like node1-edge1-node2-edge2-node3, now I want to attach a property called 'frequency' to this specific path, and its values ...
Z Yk's user avatar
  • 1
0 votes
1 answer
16 views

How is select being used outside a traversal? groovy gremlin vs nodejs gremlin

I found this QA to be very useful, or at least would be if I understood what the heck is going on, and could translate it from groovy gremlin to nodejs gremlin. What's tripping me up is the use of the ...
Joseph Summerhays's user avatar
0 votes
1 answer
66 views

Neptune graph traversal that uses dynamically calculated values from last vertex to select outgoing edges for further traversal

Here is my graph: Here is graph building code: // backslashes included so the code can be copy and pasted into gremlin console g\ .addV("Person").property(T.id, "A").as("a&...
spc16670's user avatar
  • 536
0 votes
1 answer
27 views

Neptune Gremlin how to break cycles when collecting paths

I have the following graph: Created using: g.addV("Person").property(T.id, "1").as("p1") .addV("Person").property(T.id, "2").as("p2"...
spc16670's user avatar
  • 536
0 votes
1 answer
38 views

Neptune gremlin graph traversal that uses previous edge property to decide next edge, and the property is a collection

My requirement is to use properties from incoming edge which can be sets of strings to decide which outgoing edges to select for further traversal. If any of the values in one collection can be found ...
spc16670's user avatar
  • 536

15 30 50 per page
1
2 3 4 5
241