如何在单个gremlin查询中获得与条件匹配的多个顶点
小精灵新手,需要帮助。我有一个包含以下顶点和关系的图 A---hasLocation--->B 3) A 4) C如何在单个gremlin查询中获得与条件匹配的多个顶点,gremlin,Gremlin,小精灵新手,需要帮助。我有一个包含以下顶点和关系的图 A---hasLocation--->B 3) A 4) C 5) 如果我很了解你,你会想要: g.V('A') // Start from vertex A, assuming vertex id is 'A' .out('hasLocation') // Traverse in the outgoing direction from 'A' to the 'B' vertex .in('use
5) 如果我很了解你,你会想要:
g.V('A') // Start from vertex A, assuming vertex id is 'A'
.out('hasLocation') // Traverse in the outgoing direction from 'A' to the 'B' vertex
.in('uses') // Traverse in the ingoing direction from 'B' to the 'C' vertex
.path() // Display path
如果我很了解你,你想要:
g.V('A') // Start from vertex A, assuming vertex id is 'A'
.out('hasLocation') // Traverse in the outgoing direction from 'A' to the 'B' vertex
.in('uses') // Traverse in the ingoing direction from 'B' to the 'C' vertex
.path() // Display path