jokerCoCo commented on issue #1972:
URL: 
https://github.com/apache/incubator-hugegraph/issues/1972#issuecomment-1263075413

   > 去重是用dedup(),比如 // 从各个年龄的人中选出一个代表 
`g.V().hasLabel('person').dedup().by('age')`
   > 
   > 多个属性分组: 
《图数据库实战》中写到:group()是根据指定的by()调节器对结果进行分组,使用一个或者两个by()调节器对数据进行分组。第一个by()调节器指定分组的键,第二个by()
 调节器如果存在,将指定值;如果不存在,则将传入数据收集为与分组键相关联的值列表。 
直观上的感觉似乎不支持?试了Group().by("A","B")也是报错,我尝试多种gremlin 
,也是没找到根据多个属性进行分组的方式(后续我在找找,有好消息同步)
   
   感谢你的反馈。我在尝试连续使用两个group by,如下述语法
   
g.V().hasLabel('person').group('profession').by('profession').group('city').by('city').cap('profession',
 'city');
   但是这样也只是分别根据profession、city进行了分组,而不是同时根据这两个属性分组,后续有发现我也会同步我这里的进展。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to