【发布时间】:2018-03-08 18:11:27
【问题描述】:
我编写了下面的简单查询来在 Person 到 Country 之间进行遍历,但它没有返回任何结果。
g.V().hasLabel("Person").as("p").out("from").hasLabel("Country").as("c").select("p", "c")
在实际数据中,只存在Person顶点,不存在Country顶点或from边。我希望至少返回p - 基本上我想做一个左外连接。 但是,如果我也有 Country 和 from 数据,则查询会返回结果。
我也尝试使用match 进行另一个查询,但除非有实际数据,否则仍然没有结果:
g.V().hasLabel("Person").has("name","bob").match(__.as("p").out("from").hasLabel("Country").as("c")).select("p", "c")
我正在对 Datastax Enterprise Graph 运行这些查询。
知道为什么它没有返回任何结果吗?
【问题讨论】:
标签: gremlin tinkerpop datastax-enterprise-graph