Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-31-2020 12:33 AM
Hello Room!
I have a Cypher query written which returns a path between (nodea) and (nodeb) so it starts at nodea and ends at nodeb and traverses a multi-level path through different nodes and different relationships, so a structure like:
(nodea)-[rela]-(nodeaa)-[relb]-(nodecc)-[relc]-(nodeb)
Now I can return all nodes in the path like:
match path=(nodea)-[rela]-(nodeaa)-[relb]-(nodecc)-[relc]-(nodeb)
But I have an optional match I need to apply to nodeaa, nodecc and nodeb to extract information that may or may not exist on a child node of that.
Now I understand Neo4J would take the shortest path between nodea and nodeb, but I was wondering if it was possible to extract certain node labels in a path and then perform an optional path on them?
Just to add, the path is important as its a hierarchical tree structure.
01-31-2020 01:09 AM
could you please share your query . So ,we can make changes to that to help you achieve the results you wish .
All the sessions of the conference are now available online