Right now you can't.

What you can do is to increase (e.g. double) the length of the path (as each of 
the first 20 could be deleted) and add a limit 20 at the end, but it won't get 
faster that way.

But good question.

Michael

Am 18.07.2014 um 16:36 schrieb Dissolubilis <[email protected]>:

> I have some linked list:
> 
> (post:Post)-[:NEXT]->(next_post:Post)-[:NEXT]->....
> 
> And I can query it by next simple statement:
> 
> MATCH (start:Post{Id:{post}})-[:NEXT*0..19]->posts
> RETURN posts
> 
> 
> It returns 20 posts.
> 
> But if my query is like that:
> 
> MATCH (start:Post{Id:{post}})-[:NEXT*0..19]->posts
> 
> 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)
> 
> 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.

-- 
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