Menu
  • HOME
  • TAGS

Type-Filter Step in Gremlin 3?

java,graph-databases,gremlin,tinkerpop3

Against Tinkerpop3 M6/ titan0.9 M1, the following should work: Set<Vertex> vertices = graph.V().<Vertex>has("name", "jupiter").toSet(); Most of the M6 type issues can be resolved in a similar manner (parameterizing the method that produces the element by the expected type)....

Concurrent gremlin-server and graph queries in java

java,server,gremlin,tinkerpop3

As you've found, what you are trying to do won't work because two separate processes cannot work on the embedded Neo4jGraph. As it stands you can't get access to the configured graph instances from the GremlinServer object and I'm not sure I'd change that as I'm not completely sure that...

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

groovy,gremlin,tinkerpop,tinkerpop3

You're dealing with different class types from each of those results. Consider my console session below: gremlin> g = TinkerFactory.createClassic() ==>tinkergraph[vertices:6 edges:6] gremlin> marko = g.v(1) ==>v[1] gremlin> marko.class ==>class com.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex The above yields a Vertex but as you can see below: gremlin> marko = g.V().has('name','marko') ==>v[1] gremlin> marko.class ==>class...

Is Tinkerpop3 production ready?

graph,titan,tinkerpop,tinkerpop3

At this time, TinkerPop 2.x is basically in maintenance-mode only (i.e. we've generally frozen development short of major bug fixes). All effort is focused on TP3 and getting it to GA. GA has been somewhat delayed as TinkerPop moves to its new home as an Apache project: http://tinkerpop.incubator.apache.org/ Unfortunately, we...

How to map a Tinkerpop3 graph to a recursive data structure?

titan,gremlin,tinkerpop3

I would leverage Gremlin's tree structure and some recursive method calls: import com.google.common.collect.Iterators; import com.tinkerpop.gremlin.process.T; import com.tinkerpop.gremlin.process.Traverser; import com.tinkerpop.gremlin.process.graph.util.Tree; import com.tinkerpop.gremlin.structure.Vertex; import com.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.function.Function; /** * @author Daniel Kuppitz (daniel at...

Can I get a Vertex instead of an Element out of this GraphTraversal?

java,tinkerpop,tinkerpop3

Well - you could always do this: Vertex v = g.V().has(T.label, "link").<Vertex>has("name", url).next(); and simply explicitly type the last step....

Finding all path with specific edge types in Tinkerpop 3

gremlin,tinkerpop,tinkerpop3

Use jump to recursively traverse down a path and the path step to realize the path traversed: gremlin> g = TinkerFactory.createClassic() ==>tinkergraph[vertices:6 edges:6] gremlin> g.V(1).as('x').out('knows').jump('x'){it.loops<3}{true} ==>v[2] ==>v[4] gremlin> g.V(1).as('x')out().jump('x'){it.get().id() != 5 && it.loops < 6}.path() ==>[v[1], v[4], v[5]] See more details in GremlinDocs: http://www.tinkerpop.com/docs/3.0.0-SNAPSHOT/#jump-step ...

Unable to install gremlin-neo4j through gremlin shell

neo4j,gremlin,tinkerpop3

I guess there's some discrepancy between documentation and where Neo4j stands in terms of official release. Neo4j was removed from the repository around M7 at the time TinkerPop started making releases under the Apache Software Foundation (given license conflicts). It was added back to the repository after the M9 release...