简体   繁体   中英

Group by out vertices in Gremlin

i have this structure:

Groups -> Fields -> Values

and a command gV().hasLabel('groups').out('fields').out('values')

how can I group these values by fields and by 'groups' vertices?

Thank you

This was answered on the Gremlin Users list by Daniel Kuppitz :

 gV().hasLabel("groups"). group(). by(). by(out("fields"). group(). by(). by(out("values").fold())) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM