我正在尝试对AWS海王星运行以下查询。
g.V(1).project('id', 'type', 'properties') \
.by(id) \
.by(label) \
.by(valueMap().by(unfold()))通过HTTP请求调用它会引发以下错误
{
"requestId": "5eb536e9-017a-db82-9234-db5c556e386f",
"code": "MalformedQueryException",
"detailedMessage": "Failed to interpret Gremlin query: org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertyMapStep cannot be cast to org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating"
}使用gremlin-python客户机
gremlin_python.driver.protocol.GremlinServerError: 599: {"requestId":"11f7c020-f2d5-445a-b35a-ee531c31a7e3","code":"InternalFailureException","detailedMessage":"null:by([[UnfoldStep]])"}查询应该是什么样的呢?我已经厌倦了如何修改查询以便由海王星来解释。
请注意,查询在Gremlin控制台中成功执行!
发布于 2019-04-30 11:20:51
发现上面的查询可以重写为
g.V(1).project('id', 'type', 'properties') \
.by(id) \
.by(label) \
.by(properties().group().by(__.key()).by(__.value()))但是,我仍然很困惑,为什么原始查询不能工作。如果有人能跟我解释的话,那就太好了。
https://stackoverflow.com/questions/55919463
复制相似问题