Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
90 views

Why does my Gremlin migration query only add one edge from each vertex?

I'm trying to add a Subscription vertex ([Org-Sends->Subscription<-Receives-User]) for each [Org-Manages->User] where one is not already present. I wrote this traversal, which appears to ...
chrylis -cautiouslyoptimistic-'s user avatar
0 votes
1 answer
710 views

Gremlin query how to compare properties of edges in same branch of my traversal?

I'm struggling to write a gremlin query that compares the values of each edge of a given branch of my traversal to both each other and a provided value. Here's an example - let's say I have the ...
SnoopDougg's user avatar
  • 1,597
0 votes
1 answer
29 views

Fetch vertices (at variable depths) reachable from a node

Sample graph of what I'm building I want to fetch all the students connected to a particular school. The students, however, can be present at any depth in the graph (with respect to the school). ...
Sahith Chandan's user avatar
2 votes
1 answer
342 views

gremlin console gui object browser

Whilst learning about the gremlin console, i came across the :inspect command. The help say's Inspect a variable or the last result with the GUI object browser But when i run the command i get the ...
OrdinaryOrange's user avatar
1 vote
1 answer
2k views

Add multiple edges in a single gremlin query using vertex ids

I am using gremlin REST server in my application and I want to create multiple edges to a vertex in a single query. I have the list of vertex ids from where to create edges to a single vertex. For eg....
Vipul Sharma's user avatar
2 votes
1 answer
112 views

Disable tab to display console commands in the Gremlin console

I am frequently copy-pasting some scripts to the Gremlin console that include tabs and as a result the gremlin console displays its commands for each of these tabs: gremlin> :h :help ...
gsmafra's user avatar
  • 2,464
2 votes
1 answer
321 views

Get the value corresponding to a key in the properties of a TinkerVertex

In Gremlin-Groovy, given a TinkerVertex object, what is the clearest/fastest way to retrieve the value corresponding to a key in its properties, returning a default value if it is not present (such as ...
gsmafra's user avatar
  • 2,464
1 vote
1 answer
114 views

Groovy script fails to add edges to a Gremlin graph

I'm trying to make this script work to retrieve all edges that are present in a file, with ratings from users to movies. new File('ratings.dat').eachLine{ line -> components = line.split('...
gsmafra's user avatar
  • 2,464
2 votes
1 answer
695 views

Send groovy script as a file to the Gremlin Server REST API

Here it is explained how I can interact with a Gremlin Server using its REST API. With the following command I execute the rather simple 100-1 script. curl -X POST -d "{\"gremlin\":\"100-1\"}" "http:/...
gsmafra's user avatar
  • 2,464
1 vote
1 answer
319 views

What is the best way to write a gremlin query is it through groovy script or tinkerpop steps

What is the best way to write a gremlin query is it through groovy script or tinkerpop steps? For example to sort a set of Vertices with label Employee based on their date of joining. Which is a ...
Mahi Tej Gvp's user avatar
  • 1,014
3 votes
1 answer
1k views

What is the syntax to sequence statements in Gremlin?

Within the Gremlin language (a Groovy child) I'm a little confused by the behavior and uses of ;, &&. For example, in GremlinClient REPL (running Titan 1.0 here) I might desire to add a few ...
Thomas M. DuBuisson's user avatar
2 votes
3 answers
3k views

Comparing vertex properties in Gremlin Groovy

I'm asking nearly the same question as you see here, but with the constraint that the groovy, not java, syntax must be used. Ideally the answer to would be very concise. I have a simple graph of ...
user3624334's user avatar
2 votes
1 answer
63 views

How to group "match" results

My question is "how to group the match results" of select-ed items ? Here is the structure and data I have in my graph : Structure : 5 kind of vertices : user / experience / school / company / tag ...
John Smith's user avatar
0 votes
2 answers
117 views

Traversal from Different Sources to Same Target

I have the following graph layout: I am trying to get to the TargetVertex and I am given three other vertices Vertex1, Vertex2, and Vertex3. I have to use all three source vertices to ensure that ...
Filipe Teixeira's user avatar
1 vote
1 answer
2k views

Why can't a Gremlin GraphTraversal be captured as a Groovy variable?

I am experimenting with the traversal examples from the TinkerPop3 documentation. Having loaded up the classic graph with g = TinkerFactory.createClassic(), at the Gremlin shell: gremlin> marko = ...
Dmitry Minkovsky's user avatar

15 30 50 per page