Skip to content
Advertisement

Tag: gremlin

Java Gremlin union with project incompatible types error

I have such gremlin query which perfectly works in gremlin console: However same query fails in gremlin for java org.apache.tinkerpop:gremlin-core with such error: Incompatible equality constraint: Map<String, Object> and Map<Object, Object>. That is understandable because: valueMap returns GraphTraversal<Element, Map<Object, Object>> project returns GraphTraversal<Object, Map<String, Object>> union expects traversals to operate over same type Is there any built-in solution for this?

Why does my Gremlin traversal add only one edge?

As described in another question, I am attempting to add several “identity” vertices into a “group” vertex. Based on the recipe recommendation, I’m trying to write the traversal steps in such a way that the traversers iterate the identity vertices instead of appending extra steps in a loop. Here’s what I have: This always returns a value of 1, no

How do I retrieve multiple multi-properties in Gremlin?

I have a Person object that I’m writing to a graph like this: Now I want to retrieve contents of the vertex. As documented, elementMap doesn’t work because it returns just a single property value for multi-properties. I tried values(‘name’, ’email’), but that returned all of the properties in a flattened list instead of the nested structure I expected: I’ve

Advertisement