I'm trying to create a query using the cypher-dsl component in java. But I just can't find a way to introduce query piping like I can with the WITH keyword. Is there something that I'm missing? Or is it not supported there yet? If not is there any other way to formulate a query like this one? (Traversal? Gremlin?)
START
a = node(3590,3588,3591),
d = node(3613, 3597, 3627)
WITH
collect(a) as good, collect(d) as bad
START
r = node(1)
MATCH
r--re-[:CONTAINS]-i
WHERE
ALL(x in good WHERE re-[:CONTAINS]-x)
AND
NONE(x in bad WHERE re-[:CONTAINS]-x)
RETURN
DISTINCT ID(i),
i.title,
count(re)
ORDER BY
count(re) DESC
LIMIT
10;