Hi
Take a look at this query:
START n=node(1)
MATCH (n)-[:depends_on]->(x), (n)-[:depends_on]->(y)
WITH x as x, y as y
MATCH z = x-[depends_on*1..1]->y
LIMIT 10
(in simple words: the first part gathers all nodes that depend_on node #1, and the second part returns all links between all nodes from before to themselves)
The first part before the WITH returns a huge amount of results, and now all of them are being matched at z. I would like to have something like this:
WITH x as x, y as y LIMIT 100
such that only first 100 results are passed along to the heavy processing. Is it possible?
Currently my query is stack due to this.
Thanks,
Yaron