I have some linked list:

(post:Post)-[:NEXT]->(next_post:Post)-[:NEXT]->....

And I can query it by simple statement:

MATCH (start:Post{Id:{post}})-[:NEXT*0..19]->posts
RETURN posts

For example it returns 20 posts.

But if my query is like that (I mark some nodes as Deleted):


MATCH (start:Post{Id:{post}})-[:NEXT*0..19]->post
WHERE NOT post:Deleted
RETURN posts



Then I will certainly not get 20 posts (i.e. if I have 3 posts with 
label:Deleted, then I will get 17 posts). But I need that query to return 
always 20 posts.

How can I achieve fixed length of variable path with some conditions?

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to