Hi
I'm a newbie for neo4j, I've build up a linked list below:
------------------------------------
WITH range(1,10000) AS Ids unwind Ids AS id
MERGE (e1:Event { value:id })
MATCH (e:Event)
WITH COLLECT(e) as events
foreach (i in range(0,length(events)-2)|
foreach(e1 in [events[i]]|foreach (e2 in [events[i+1]]|
create unique (e1)-[:NEXT]->(e2))))
-------------------------
I tried with below query in http://console.neo4j.org/ but came up with
error as follow.
Error: org.neo4j.kernel.guard.GuardOperationsCountException: max ops (ops=
1000001)
MATCH p=(e:Event { value:123 })-[:NEXT*0..150]->(e2:Event { value:125 })
RETURN length(p)
Obviously, this is not a good way for doing this.
What I really want is to get the path depth between two specific nodes with
NEXT relationship.
MATCH p=(e:Event { value:123 })-*[:NEXT*]*->(e2:Event { value:125 })
RETURN length(p)
or assumed that I created a time tree(as here
<http://www.markhneedham.com/blog/2014/04/19/neo4j-cypher-creating-a-time-tree-down-to-the-day/>),
and series of event with (event)-[:HAPPONED_ON->(d:Day), I want to
calculate how many days between these two days.
Is there a correct/good way to calculate the path depth?
Regards
--
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.