I would like to boost edges for a user depending of some rules base on graph traversal. Basically in mysql I would do that :
select id, sum(weight) as total
from
(
select id, 10 as weight
from user
inner join userRel1 ON user.id = userRel1.userId
where userRel1.attr1 in (1, 2)
union
select id, 5 as weight
from user
inner join userRel2 ON user.id = userRel2.userId
inner join userRel3 ON user.id = userRel3.userId
where userRel2.attr2 = 'a' and userRel3.attr2 = 'z'
union
...
)
group by id
order by total desc
Also, I have already writed this query with some help in gremlin 3 but I would like to compare performance with cypher. But I read in this post that group by on union are not possible yet, it mean that cypher is less powerful than gremlin ? Would I have to set weight as properties on edges to achieve it ?
Thanks