图如下:
gremlin> a = graph.addVertex("name", "alice")
gremlin> b = graph.addVertex("name", "bobby")
gremlin> c = graph.addVertex("name", "cindy")
gremlin> d = graph.addVertex("name", "david")
gremlin> e = graph.addVertex(
当在simplePath()中执行match()时,我的查询不再返回结果。
查询试图查找任何事件(例如,“图形数据库会议”),这些事件以某种方式涉及到三个特定的人。
“爱丽丝”参加了举办这次活动的学校。
“鲍勃”在活动中是个热狗小贩。
"marko“为这次活动提供了安全保障。
我正在使用match()来找出这三个人在哪里汇合。如果有更好的方法,请提出建议。谢谢!刚开始学葛兰。
Ascii艺术:
alice --[enrolled-in]-> gremlin 101 --[offered-by]-> graph db school
您能帮我把这个查询转换成一个与CosmosDB兼容的gremlin查询吗?不幸的是,我得到了Gremlin op does not support by(traversal),看起来应该归功于CosmosDB中Gremlin的版本。
谢谢。
查询
g.V().limit(10)
.dedup()
.as('node')
.project('id', 'label', 'properties', 'edges')
.by(__.id())
.by(__.label())
我们可以执行以下操作来创建连接,然后将连接附加到图形g对象,然后使用g内联地镜像gremlin查询。
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
Create a
我正在尝试使用描述的技术来防止gremlin中的重复边。我正在使用javascript,查询失败了,出现了以下错误:Server error: Neither the map, sideEffects, nor path has a v-key: WhereEndStep(v) (500)。这正是我所使用的查询:
import { process } from "gremlin";
const { statics } = process;
...
g
.V()
.has('user',