Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

How to do path queries with whitelisted "waypoint" nodes?

Node Clone

I saw somewhere in the docs a way to do advanced queries with "whitelisting" nodes, but I can't find it now. Can anyone help with a link?

I want to do a path search in that all the nodes share a common property, but for some reason a basic ()-[]-() type query is returning many other nodes in the middle. I can't seem to control the node properties So I thought I would try the more complicated way to do it!

I have a query a bit like:

    match path = 
         n1.flow = 'BILL' 
         and n2.flow = 'BILL'
    return path 
    limit 20

so nodes n1 and n2 should only be with BILL flow.
However nodes with other properties are being returned in the path...

afaik the [...] is just for pattern matching on relations, not on intermediate nodes.
So the above is basically like writing

start(bill)-anything-end(bill) where anything is not controlled by the query above.

So whitelisting to specify node properties seems like one approach?
Perhaps I could also grab everything and just manually walk the graph and filter out nodes that don't match.


Node Clone

found it, it's part of APOC