red
red
ATApache TinkerPop
Created by red on 10/14/2024 in #questions
Naming multiple vertices
I've got a list of vertices and a list of unique names. I'm looking to apply one name to each node, but struggling with the syntax. I think I should be using some sort of query builder where I can do: names.forEach(index, name) I'm expecting each query to involve select() where() has() index(), but have been having some difficulties in figuring out how to piece these together in gremlin js
3 replies
ATApache TinkerPop
Created by red on 9/27/2024 in #questions
Vertex hashmaps
Hi, I'm looking to copy subgraphs, if there are better practices for this in general, please let me know I'm currently looking at emitting a subtree, then creating new vertices, storing a mapping of the original to the copy, and reusing this mapping to build out the relationships for the copied vertices. I'm not sure how I should be doing this, currently I'm trying to use the aggregate step to store the original/copy pairs, but I'm not sure how to select nodes from this in future steps. I'd appreciate any suggestions or help around these kind of operations, thanks I've been able to do this by building edges between the original nodes and the copies and traversing them, but I'm not sure if this is a typical pattern or there may be better approaches
6 replies