Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-01-2021 10:14 AM
Hello,
I am pretty new to Neo4j and Cypher. From my understanding, when using variable length pattern matching, Neo4j uses DFS by default.
I have the following query:
MATCH path = (u:Egg {name: "RootEgg"})-[:Mutation1|Mutation2*0..]->(c:Egg) RETURN c, relationships(path)
Starting from a node, I want to find all the child nodes (they form a binary tree) that are related with the root node by a series of mutations (either Mutation1 or Mutation2). The thing is I want this binary tree ordered such that when using DFS to traverse the tree, Mutation 1 has priority over Mutation 2.
Is there anyway to specify this relationship priority so DFS tries to expand Mutation1 before it tries to expand Mutation2.
Thank you very much!
All the sessions of the conference are now available online