I am currently working on a program using graph db - neo4j and I need to realize the following function.
BTW, I will meet this situation many many times in my program. Do you guys have any idea how to implement it efficiently.
Thanks in advance.
Suggestion for Setup
(Ax)-[:TRUE ]->(Nx)-[:TRUE ]->(Ax+1)
(Ax)-[:FALSE]->(Nx)-[:FALSE]->(Ax+1)
Suggestion for Query
MATCH (a:A {id:1}),
(a)-[:TRUE]-> (n)-[:FALSE]->(a2),
(a)-[:FALSE]->(n2)-[:TRUE]->(a2),
(a)-[:TRUE]-> (n)-[:FALSE]->(a2)
RETURN a2;
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.