How to use select with V()

Hello, during my traversal, i found a list of vertex ids, how can i query those vertices in the same traversal without iterating over all vertices and filter them with where ? g.V() .group() .by(T.id) .by(both().id().fold()) .unfold() .project("d") .by(V(select(Column.values)).label()) this is just an illustration, my query is really bigger, but the V(select()) part isn't working, any idea ? thx
Solution:
Currently, and this may change in the future, the V() step cannot take a traversal. I think however, that you can simplify that query quite a bit.
Jump to solution
3 Replies
Solution
kelvinl2816
kelvinl28162y ago
Currently, and this may change in the future, the V() step cannot take a traversal. I think however, that you can simplify that query quite a bit.
paull8147
paull81472y ago
I implemented a community algorithm, during an iteration I group by community all vertices in the same community then i must select the best new community depending those vertices. I will easily find something else with java, thanks
kelvinl2816
kelvinl28162y ago
FWIW the work-around is to use the where....by syntax in lieu of V(select(...)) but depending on the database you are using that may, or may not, perform acceptably.
Want results from more Discord servers?
Add your server