I've been using Neo4j for the past 3 months.
I've built a 10M node graph database.
I've been reading: http://neo4j.com/docs/stable/introduction-pattern.html
My goal is to look-up a single node's value by it's property (easy part) and then I need to discover all nodes connected to my look-up node that have a specific edge label. The question I have is I get very different behavior and I really don't understand why.
Bottom-line is I need a pattern that will allow me to look up Node1 and find every single node connected to that Node1 having a specific edge label and then assign a single identifier value to it (so that I can say this group of 100 nodes is part of ClusterIDGroup1).
Pattern 1
MATCH (l:CodeType { id_value : '050001' })-[:IDENTIFIED_BY*]-(m:CodeType)
WHERE 1=1
RETURN *
LIMIT 10000
;
Returns: 62 nodes
Pattern 2
MATCH (l:CodeType { id_value : '050001' })-[:IDENTIFIED_BY*30]-(m:CodeType)
WHERE 1=1
RETURN *
LIMIT 10000
;
Returns: 90 nodes
Pattern 3
MATCH (l:CodeType { id_value : '050001' })-[:IDENTIFIED_BY*0..30]-(m:CodeType)
WHERE 1=1
RETURN *
LIMIT 10000
;
Returns: 115 nodes
Why would I get 115, 90, and 62 depending on the variable length expression? I would think that 1) * would get me the most nodes 2) *0..30 would get me the second most and 3) *30 would get me the least.
Thanks