Kennh
Kennh
ATApache TinkerPop
Created by Kennh on 9/29/2023 in #questions
Should by() Modulator Work For More Types?
This works. gremlin> g.V().out().out().path().by("name") ==>[marko,josh,ripple] ==>[marko,josh,lop] but this doesn't. gremlin> g.union(__.V().out().out().path().by("name")) The by("name") modulator can only be applied to a traverser that is an Element or a Map - it is being applied to [false] a Boolean class instead Was this an intentional decision?
5 replies
ATApache TinkerPop
Created by Kennh on 9/28/2023 in #questions
Easiest Way to Get List Cardinality Properties As a List?
What is the easiest way to retrieve the vertex properties that have list cardinality back as a list in the traversal stream? The values() step seems to unfold the list. For example, using the "the crew" example graph. gremlin> g.V().valueMap() ==>[name:[marko],location:[san diego,santa cruz,brussels,santa fe]] ==>[name:[stephen],location:[centreville,dulles,purcellville]] ==>[name:[matthias],location:[bremen,baltimore,oakland,seattle]] ==>[name:[daniel],location:[spremberg,kaiserslautern,aachen]] ==>[name:[gremlin]] ==>[name:[tinkergraph]] I want something like the following: gremlin> g.V().valueMap("location").select(values).unfold() ==>[san diego,santa cruz,brussels,santa fe] ==>[centreville,dulles,purcellville] ==>[bremen,baltimore,oakland,seattle] ==>[spremberg,kaiserslautern,aachen] Is there a more direct way than valueMap().select(values).unfold()?
5 replies
ATApache TinkerPop
Created by Kennh on 6/27/2023 in #questions
Gremlin Statement for Adding Edges Based on Existence of Other Edges
I'm trying to figure out how to do the following in Gremlin with Kelvin's air-routes data. I want to be able to add direct flights (edge with route label) from airports (vertex with airport label) that currently have routes that are exactly two degrees away but currently don't have a direct connecting route. Is it possible to do this in one statement?
5 replies