【发布时间】:2021-02-05 18:28:17
【问题描述】:
我的图表架构如下所示:
(Location)<-[:INVENTOR_LOCATED_IN]-(Inventor)-[:INVENTOR_OF]->(Patent)
我正在尝试从查询路径中的每个步骤返回多个值。这是我目前运行正确的查询:
g.V().and(has('Location', 'city', textContains('Bloomington')), has('Location','state',textContains('IN'))).as('a').
bothE().bothV().hasLabel('Inventor').as('b').
bothE().bothV().has('Patent', 'title', textContains('Lid')).as('c').
select('a,', 'b', 'c').
by('state').by('name_first').by('title').
fold();
我想做的是为每个步骤返回两个节点属性。我尝试了以下但它返回一个错误:
g.V().and(has('Location', 'city', textContains('Bloomington')), has('Location', 'state',textContains('IN'))).as('a').
bothE().bothV().hasLabel('Inventor').as('b').
bothE().bothV().has('Patent', 'title', textContains('Lid')).as('c').
select('a,', 'b', 'c').
by('city', 'state').by('name_first', 'name_last').by('title', 'abstract').
fold();
谁能建议允许我从路径中的每个节点返回多个属性的语法?
【问题讨论】:
标签: gremlin janusgraph