Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is the query that should return the collection of the nodes that have the relationship [:CONTAINS] to the nodes "midNode" on the path with the specified starting and ending point. It groups the desired "searchedNode" by the path. </p> <pre><code>START startNode=node(3), endNode=node(5) Match path=startNode-[:Connect*]-&gt;midNode-[:Connect*]-&gt;endNode, searchedNode-[:CONTAINS]-&gt;midNode Return distinct path, collect(searchedNode) as searchedNodes </code></pre> <p>Update: It is to be noted that the identifier 'midNode' represents every node on the path between the two specified starting and ending nodes because of the variable length relationships [:Connect*] that connects it to the starting and ending points. Concretely, it represents the node('m1') one step away from the starting node as in this case startNode-[:Connect]->m1-[:Connect]->...->endNode; and 'm2' that is two steps away from the starting node as in this case startNode-[:Connect]-()-[:Connect]->m2-[:Connect]->...->endNode. As a matter of fact, the matched paths would be a collection of paths each of which corresponds to one node between the startNode and the endNode. Since we only want one path for all of the middle nodes on the path, the DISTINCT is used to remove the duplicate paths, and the searchedNode would be grouped by the key that is the path, so the collection of the searchedNode would be the collection of all the nodes that are related to all the nodes on the path between the startNode and the endNode. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload