neo4j - Cypher: find a path that satisfies a condition between steps i and i+1 -


I am trying to write a cipher query that returns a path with that condition that with value in each step The timestamp property should be less than or equal to the previous step which is what I have not yet done.

  matching path = (a: NODE) ​​- [: parent *] - & gt; (B: NODE) ​​WHERE a.name = 'SOME_VALUE' and B. Names = 'SOME_OTHER_VALUE', the path in the form of relationships (path) where all (I in range (0, length (phase) - 1 ) Where step [i]. Timestamp & lt; = steps [i + 1]. Timestamp) Return path   

I think what I have but the neo4j web console is telling me That I have a syntax error. Invalid entry '': Expected white space, '[', '=' ', IN, IS,' ^ ',' * ',' / ','% ',' + ' ',' - ',' & lt; ',' & Gt; ",", ",", "," = ", AND, XOR, or ')' (line 4, column 60)" WHERE ALL "in range (0, length ( Phase) - 1) Where steps [i] Timestamp & lt; = Steps [i + 1]. Timestamp) "^

I have access to a relation collection on the other such a way so I do not know what I am doing.

Again, you need to wrap step [i] in parentheses with your statement:

  relationship path = (a: NODE) ​​- [: parent *] -> (B: NODE) ​​WHERE a.name = 'SOME_VALUE' and b.name = 'SOME_OTHER_VALUE', relationship (Path) as the phase where all (i in the range (0, length (phase) - 1) where (phase [i]). Timestamp & l T; = (step [i + 1]. Timestamp) return path    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -